compression

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: ISC Imports: 6 Imported by: 3

Documentation

Index

Constants

View Source
const DEFAULT_COMPRESSION_ALGORITHM = "LZ4"

Variables

This section is empty.

Functions

func DeflateGzipStream

func DeflateGzipStream(r io.Reader) (io.Reader, error)

func DeflateLZ4Stream

func DeflateLZ4Stream(r io.Reader) (io.Reader, error)

func DeflateStream

func DeflateStream(name string, r io.Reader) (io.Reader, error)

func DeflateZstdStream added in v1.1.4

func DeflateZstdStream(r io.Reader) (io.Reader, error)

func InflateGzipStream

func InflateGzipStream(r io.ReadCloser) (io.ReadCloser, error)

func InflateLZ4Stream

func InflateLZ4Stream(r io.ReadCloser) (io.ReadCloser, error)

func InflateStream

func InflateStream(name string, r io.ReadCloser) (io.ReadCloser, error)

func InflateZstdStream added in v1.1.4

func InflateZstdStream(r io.ReadCloser) (io.ReadCloser, error)

Types

type Configuration

type Configuration struct {
	Algorithm  string `json:"algorithm"`
	Level      int    `json:"level"`       // Compression level (-1 for default)
	WindowSize int    `json:"window_size"` // Window size for algorithms like zstd or Brotli
	ChunkSize  int    `json:"chunk_size"`  // Chunk size for streaming compression
	BlockSize  int    `json:"block_size"`  // Block size for block-based algorithms like bzip2
	EnableCRC  bool   `json:"enable_CRC"`  // Enable/disable checksum (e.g., gzip CRC32, zstd)
}

func LookupDefaultConfiguration

func LookupDefaultConfiguration(algorithm string) (*Configuration, error)

func NewDefaultConfiguration

func NewDefaultConfiguration() *Configuration

Jump to

Keyboard shortcuts

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