From 2524cbd8475add0c962f4e7ab0f5fd9eb5b30085 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Tue, 13 Feb 2018 10:02:25 -0800 Subject: [PATCH] added code comment on how to generate default tables as suggested by @terrelln --- lib/decompress/zstd_decompress.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/decompress/zstd_decompress.c b/lib/decompress/zstd_decompress.c index d65dd5fd9..36dfc6376 100644 --- a/lib/decompress/zstd_decompress.c +++ b/lib/decompress/zstd_decompress.c @@ -667,6 +667,15 @@ size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx* dctx, } } +/* Default FSE distribution tables. + * These are pre-calculated FSE decoding tables using default distributions as defined in specification : + * https://github.com/facebook/zstd/blob/master/doc/zstd_compression_format.md#default-distributions + * They were generated programmatically with following method : + * - start from default distributions, present in /lib/common/zstd_internal.h + * - generate tables normally, using ZSTD_buildFSETable() + * - printout the content of tables + * - pretify output, report below, test with fuzzer to ensure it's correct */ + /* Default FSE distribution table for Literal Lengths */ static const ZSTD_seqSymbol LL_defaultDTable[(1<