Expand description
§fsst-rs
A pure-Rust, zero-dependency implementation of the FSST string compression algorithm.
FSST is a string compression algorithm meant for use in database systems. It was designed by Peter Boncz, Thomas Neumann, and Viktor Leis. It provides 1-3GB/sec compression and decompression of strings at compression rates competitive with or better than LZ4.
This implementation is somewhat inspired by the MIT-licensed implementation from the paper authors, written in C++, but it is mostly written from a careful reading of the paper.
NOTE: This current implementation is still in-progress and is not production ready, please use at your own risk.
NOTE: This crate only works on little-endian architectures currently. There are no current plans to support big-endian targets.
Structs§
- Compressor
- A compressor that uses a symbol table to greedily compress strings.
- Compressor
Builder - Entrypoint for building a new
Compressor
. - Decompressor
- Decompressor uses a symbol table to take a stream of 8-bit codes into a string.
- Symbol
Symbol
s are small (up to 8-byte) segments of strings, stored in aCompressor
and identified by an 8-bit code.
Constants§
- ESCAPE_
CODE - Code used to indicate bytes that are not in the symbol table.
- FSST_
CODE_ BASE - First code in the symbol table that corresponds to a non-escape symbol.
- FSST_
CODE_ BITS - Number of bits in the
ExtendedCode
that are used to dictate a code value. - FSST_
CODE_ MASK - Maximum value for the extended code range.
- FSST_
CODE_ MAX - Maximum code value in the extended code range.
- FSST_
LEN_ BITS - First bit of the “length” portion of an extended code.