compression

package
v0.46.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package compression provides a buffer pool for resource decompression. It also initializes the default buffer pool and zstd encoder/decoder with a dictionary for the specs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildConfig

func BuildConfig(enabled, useDict, usePool bool) (specs.CompressionConfig, error)

BuildConfig creates a new CompressionConfig with the given options.

func InitConfig

func InitConfig(enabled bool) error

InitConfig initializes the compression configuration for the resource specs.

Types

type TieredBufferPool

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

TieredBufferPool is a buffer pool that uses multiple sized buffer pools.

func NewTieredBufferPool

func NewTieredBufferPool(minSize int, poolSizes []int) *TieredBufferPool

NewTieredBufferPool creates a new TieredBufferPool with the given minimum size and pool sizes.

func (*TieredBufferPool) Get

func (t *TieredBufferPool) Get(length int) specs.Buffer

Get implements the specs.BufferPool interface.

Jump to

Keyboard shortcuts

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