Files
zstd-rs/contrib/educational_decoder
Sean Purcell 5657e0e07d Added ZSTD_get_decompressed_size
Since this implementation handles multiple concatenated frames,
to determine decompressed size we must traverse the entire input,
checking each frame's frame_content_size field
2017-01-30 14:56:29 -08:00
..
2017-01-30 14:56:29 -08:00
2017-01-30 11:44:43 -08:00

Educational Decoder

zstd_decompress.c is a self-contained implementation of a decoder according to the Zstandard format specification written in C99. While it does not implement as many features as the reference decoder, such as the streaming API or content checksums, it is written to be easy to follow and understand, to help understand how the Zstandard format works. It's laid out to match the format specification, so it can be used to understand how confusing segments could be implemented. It also contains implementations of Huffman and FSE table decoding.

harness.c provides a simple test harness around the decoder:

harness <input-file> <output-file> [dictionary]