2017-01-30 11:42:45 -08:00
|
|
|
Educational Decoder
|
|
|
|
===================
|
|
|
|
|
2017-01-30 14:57:02 -08:00
|
|
|
`zstd_decompress.c` is a self-contained implementation in C99 of a decoder,
|
|
|
|
according to the [Zstandard format specification].
|
2017-01-30 11:42:45 -08:00
|
|
|
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],
|
2017-01-30 14:57:02 -08:00
|
|
|
so it can be used to understand how complex segments could be implemented.
|
2017-01-30 11:42:45 -08:00
|
|
|
It also contains implementations of Huffman and FSE table decoding.
|
|
|
|
|
2017-01-30 14:57:02 -08:00
|
|
|
[Zstandard format specification]: https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md
|
2017-01-30 11:42:45 -08:00
|
|
|
[format specification]: https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md
|
|
|
|
|
|
|
|
`harness.c` provides a simple test harness around the decoder:
|
|
|
|
|
|
|
|
harness <input-file> <output-file> [dictionary]
|
|
|
|
|