From: Yann Collet Date: Tue, 13 Feb 2018 18:02:25 +0000 (-0800) Subject: added code comment on how to generate default tables X-Git-Tag: v1.3.4~1^2~58^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2524cbd8475add0c962f4e7ab0f5fd9eb5b30085;p=thirdparty%2Fzstd.git added code comment on how to generate default tables as suggested by @terrelln --- 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<