Skip to main content

Module block

Module block 

Source
Expand description

Encodings based on traditional block compression schemes

Traditional compressors take in a buffer and return a smaller buffer. All encoding description is shoved into the compressed buffer and the entire buffer is needed to decompress any of the data.

These encodings are not transparent, which limits our ability to use them. In addition they are often quite expensive in CPU terms.

However, they are effective and useful for some cases. For example, when working with large variable length values (e.g. source code files) they can be very effective.

The module introduces the [BufferCompressor] trait which describes the interface for a traditional block compressor. It is implemented for the most common compression schemes (zstd, lz4, etc).

There is not yet a mini-block variant of this compressor (but could easily be one) and the full zip variant works by applying compression on a per-value basis (which allows it to be transparent).

Structs§

CompressedBufferEncoder
CompressionConfig
GeneralBlockDecompressor
A block decompressor that first applies general-purpose compression (LZ4/Zstd) before delegating to an inner block decompressor.
GeneralBufferCompressor
NoopBufferCompressor

Enums§

CompressionScheme

Traits§

BufferCompressor