Skip to main content

Module compression

Module compression 

Source
Expand description

Compression utilities for Heddle storage.

Provides configurable compression with support for:

  • zstd: High compression ratio, good speed
  • Delta encoding: For similar versions of the same file

Structs§

CompressionConfig
Compression configuration.

Enums§

CompressionDictionary
A versioned zstd dictionary available to object encoders.
CompressionError
Compression error type.

Functions§

compress
Compress data with automatic algorithm selection.
compress_with_dictionary
Compress data with a durable, versioned dictionary.
decompress
Decompress data based on header.
decompress_with_dictionary
Decompress data that uses the dictionary compression wrapper.
header_uncompressed_size
Peek at the recorded uncompressed size in a header-prefixed blob, without decompressing the payload. Returns None for short or unprefixed inputs (the caller can then fall back to the file length).
is_compressed
Check if data is compressed (has compression header).