compressorv3

package
v0.0.0-...-9a53218 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Zstd_Strategy_name = map[int32]string{
		0: "DEFAULT",
		1: "FAST",
		2: "DFAST",
		3: "GREEDY",
		4: "LAZY",
		5: "LAZY2",
		6: "BTLAZY2",
		7: "BTOPT",
		8: "BTULTRA",
		9: "BTULTRA2",
	}
	Zstd_Strategy_value = map[string]int32{
		"DEFAULT":  0,
		"FAST":     1,
		"DFAST":    2,
		"GREEDY":   3,
		"LAZY":     4,
		"LAZY2":    5,
		"BTLAZY2":  6,
		"BTOPT":    7,
		"BTULTRA":  8,
		"BTULTRA2": 9,
	}
)

Enum value maps for Zstd_Strategy.

View Source
var File_envoy_extensions_compression_zstd_compressor_v3_zstd_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Zstd

type Zstd struct {

	// Set compression parameters according to pre-defined compression level table.
	// Note that exact compression parameters are dynamically determined,
	// depending on both compression level and source content size (when known).
	// Value 0 means default, and default level is 3.
	// Setting a level does not automatically set all other compression parameters
	// to default. Setting this will however eventually dynamically impact the compression
	// parameters which have not been manually set. The manually set
	// ones will 'stick'.
	CompressionLevel *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=compression_level,json=compressionLevel,proto3" json:"compression_level,omitempty"`
	// A 32-bits checksum of content is written at end of frame. If not set, defaults to false.
	EnableChecksum bool `protobuf:"varint,2,opt,name=enable_checksum,json=enableChecksum,proto3" json:"enable_checksum,omitempty"`
	// The higher the value of selected strategy, the more complex it is,
	// resulting in stronger and slower compression.
	// Special: value 0 means "use default strategy".
	Strategy Zstd_Strategy `` /* 137-byte string literal not displayed */
	// A dictionary for compression. Zstd offers dictionary compression, which greatly improves
	// efficiency on small files and messages. Each dictionary will be generated with a dictionary ID
	// that can be used to search the same dictionary during decompression.
	// Please refer to `zstd manual <https://github.com/facebook/zstd/blob/dev/programs/zstd.1.md#dictionary-builder>`_
	// to train a specific dictionary for compression.
	Dictionary *v3.DataSource `protobuf:"bytes,4,opt,name=dictionary,proto3" json:"dictionary,omitempty"`
	// Value for compressor's next output buffer. If not set, defaults to 4096.
	ChunkSize *wrapperspb.UInt32Value `protobuf:"bytes,5,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"`
	// contains filtered or unexported fields
}

[#next-free-field: 6]

func (*Zstd) Descriptor deprecated

func (*Zstd) Descriptor() ([]byte, []int)

Deprecated: Use Zstd.ProtoReflect.Descriptor instead.

func (*Zstd) GetChunkSize

func (x *Zstd) GetChunkSize() *wrapperspb.UInt32Value

func (*Zstd) GetCompressionLevel

func (x *Zstd) GetCompressionLevel() *wrapperspb.UInt32Value

func (*Zstd) GetDictionary

func (x *Zstd) GetDictionary() *v3.DataSource

func (*Zstd) GetEnableChecksum

func (x *Zstd) GetEnableChecksum() bool

func (*Zstd) GetStrategy

func (x *Zstd) GetStrategy() Zstd_Strategy

func (*Zstd) ProtoMessage

func (*Zstd) ProtoMessage()

func (*Zstd) ProtoReflect

func (x *Zstd) ProtoReflect() protoreflect.Message

func (*Zstd) Reset

func (x *Zstd) Reset()

func (*Zstd) String

func (x *Zstd) String() string

func (*Zstd) Validate

func (m *Zstd) Validate() error

Validate checks the field values on Zstd with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Zstd) ValidateAll

func (m *Zstd) ValidateAll() error

ValidateAll checks the field values on Zstd with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ZstdMultiError, or nil if none found.

type ZstdMultiError

type ZstdMultiError []error

ZstdMultiError is an error wrapping multiple validation errors returned by Zstd.ValidateAll() if the designated constraints aren't met.

func (ZstdMultiError) AllErrors

func (m ZstdMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ZstdMultiError) Error

func (m ZstdMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ZstdValidationError

type ZstdValidationError struct {
	// contains filtered or unexported fields
}

ZstdValidationError is the validation error returned by Zstd.Validate if the designated constraints aren't met.

func (ZstdValidationError) Cause

func (e ZstdValidationError) Cause() error

Cause function returns cause value.

func (ZstdValidationError) Error

func (e ZstdValidationError) Error() string

Error satisfies the builtin error interface

func (ZstdValidationError) ErrorName

func (e ZstdValidationError) ErrorName() string

ErrorName returns error name.

func (ZstdValidationError) Field

func (e ZstdValidationError) Field() string

Field function returns field value.

func (ZstdValidationError) Key

func (e ZstdValidationError) Key() bool

Key function returns key value.

func (ZstdValidationError) Reason

func (e ZstdValidationError) Reason() string

Reason function returns reason value.

type Zstd_Strategy

type Zstd_Strategy int32

Reference to http://facebook.github.io/zstd/zstd_manual.html

const (
	Zstd_DEFAULT  Zstd_Strategy = 0
	Zstd_FAST     Zstd_Strategy = 1
	Zstd_DFAST    Zstd_Strategy = 2
	Zstd_GREEDY   Zstd_Strategy = 3
	Zstd_LAZY     Zstd_Strategy = 4
	Zstd_LAZY2    Zstd_Strategy = 5
	Zstd_BTLAZY2  Zstd_Strategy = 6
	Zstd_BTOPT    Zstd_Strategy = 7
	Zstd_BTULTRA  Zstd_Strategy = 8
	Zstd_BTULTRA2 Zstd_Strategy = 9
)

func (Zstd_Strategy) Descriptor

func (Zstd_Strategy) Enum

func (x Zstd_Strategy) Enum() *Zstd_Strategy

func (Zstd_Strategy) EnumDescriptor deprecated

func (Zstd_Strategy) EnumDescriptor() ([]byte, []int)

Deprecated: Use Zstd_Strategy.Descriptor instead.

func (Zstd_Strategy) Number

func (Zstd_Strategy) String

func (x Zstd_Strategy) String() string

func (Zstd_Strategy) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL