compression

package
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: ISC Imports: 6 Imported by: 3 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 DeflateSnappyStream added in v1.1.11

func DeflateSnappyStream(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 InflateSnappyStream added in v1.1.11

func InflateSnappyStream(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