Documentation ¶
Index ¶
Constants ¶
View Source
const NamePrefix = "zstdarrow"
NamePrefix is prefix, with N for compression level.
Variables ¶
View Source
var TTL = time.Minute
TTL is modified in testing.
Functions ¶
func SetDecoderConfig ¶
func SetDecoderConfig(cfg DecoderConfig) error
func SetEncoderConfig ¶
func SetEncoderConfig(cfg EncoderConfig) error
Types ¶
type DecoderConfig ¶
type DecoderConfig struct { // MemoryLimitMiB is a memory limit control for the decoder, // as a way to limit overall memory use by Zstd. // See `zstdlib.WithDecoderMaxMemory()`. MemoryLimitMiB uint32 `mapstructure:"memory_limit_mib"` // MaxWindowSizeMiB limits window sizes that can be configured // in the corresponding encoder's `EncoderConfig.WindowSizeMiB` // setting, as a way to control memory usage. // See `zstdlib.WithDecoderMaxWindow()`. MaxWindowSizeMiB uint32 `mapstructure:"max_window_size_mib"` // Concurrency is a Zstd-library parameter that configures the // use of background goroutines to improve decompression speed. // 0 means to let the library decide (it will use up to GOMAXPROCS), // and 1 means to avoid background workers. (default: 1) // See `zstdlib.WithDecoderConcurrency()`. Concurrency uint `mapstructure:"concurrency"` }
func DefaultDecoderConfig ¶
func DefaultDecoderConfig() DecoderConfig
func (DecoderConfig) Validate ¶
func (cfg DecoderConfig) Validate() error
type EncoderConfig ¶
type EncoderConfig struct { // Level is meaningful in the range [0, 10]. No invalid // values, they all map into 4 default configurations. (default: 5) // See `zstdlib.WithEncoderLevel()`. Level Level `mapstructure:"level"` // WindowSizeMiB is a Zstd-library parameter that controls how // much window of text is visible to the compressor at a time. // It is the dominant factor that determines memory usage. // If zero, the window size is determined by level. (default: 0) // See `zstdlib.WithWindowSize()`. WindowSizeMiB uint32 `mapstructure:"window_size_mib"` // Concurrency is a Zstd-library parameter that configures the // use of background goroutines to improve compression speed. // 0 means to let the library decide (it will use up to GOMAXPROCS), // and 1 means to avoid background workers. (default: 1) // See `zstdlib.WithEncoderConcurrency()`. Concurrency uint `mapstructure:"concurrency"` }
func DefaultEncoderConfig ¶
func DefaultEncoderConfig() EncoderConfig
func (EncoderConfig) CallOption ¶
func (cfg EncoderConfig) CallOption() grpc.CallOption
func (EncoderConfig) Name ¶
func (cfg EncoderConfig) Name() string
func (EncoderConfig) Validate ¶
func (cfg EncoderConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.