Add educational decoder to /contrib

This commit is contained in:
Sean Purcell committed 2017-01-30 11:44:43 -08:00
1 parent b5fd15ccb2
commit 9700f92583
4 files changed
+2213

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
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.
[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]