]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
minor compression level corrections
authorYann Collet <yann.collet.73@gmail.com>
Sun, 17 Jul 2016 14:21:37 +0000 (16:21 +0200)
committerYann Collet <yann.collet.73@gmail.com>
Sun, 17 Jul 2016 14:21:37 +0000 (16:21 +0200)
NEWS
lib/common/huf.h
lib/compress/zstd_compress.c
lib/dictBuilder/zdict.c
zstd_compression_format.md

diff --git a/NEWS b/NEWS
index 2c318462b9ccd425800b3ddf1701ec1c582f020e..dc9099a3f80316597425b67b7029fdd553e2e47b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
 v0.7.5
 Fixed : premature end of frame when zero-sized raw block, reported by Eric Biggers
+Update : specification, to v0.1.2 : max huffman depth at 11 bits
 
 v0.7.4
 Added : homebrew for Mac
index 3b837f10150fc834ae3af59282924c599a2088b9..29bab4b7646fb80863cf43068d87c3378f371be1 100644 (file)
@@ -100,7 +100,7 @@ size_t HUF_compress2 (void* dst, size_t dstSize, const void* src, size_t srcSize
 /* *** Constants *** */
 #define HUF_TABLELOG_ABSOLUTEMAX  16   /* absolute limit of HUF_MAX_TABLELOG. Beyond that value, code does not work */
 #define HUF_TABLELOG_MAX  12           /* max configured tableLog (for static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG */
-#define HUF_TABLELOG_DEFAULT  HUF_TABLELOG_MAX   /* tableLog by default, when not specified */
+#define HUF_TABLELOG_DEFAULT  11       /* tableLog by default, when not specified */
 #define HUF_SYMBOLVALUE_MAX 255
 #if (HUF_TABLELOG_MAX > HUF_TABLELOG_ABSOLUTEMAX)
 #  error "HUF_TABLELOG_MAX is too large !"
index 26b6d6e33893286a3ec7a2ae3306ba4f5dfb008b..51980d5500c7941321189f5f4d8e3f2b12c55d0a 100644 (file)
@@ -3016,7 +3016,7 @@ static const ZSTD_compressionParameters ZSTD_defaultCParameters[4][ZSTD_MAX_CLEV
 {   /* for srcSize <= 16 KB */
     /* W,  C,  H,  S,  L,  T, strat */
     { 14, 12, 12,  1,  7,  6, ZSTD_fast    },  /* level  0 - not used */
-    { 14, 14, 14,  1,  7,  6, ZSTD_fast    },  /* level  1 */
+    { 14, 14, 14,  1,  6,  6, ZSTD_fast    },  /* level  1 */
     { 14, 14, 14,  1,  4,  6, ZSTD_fast    },  /* level  2 */
     { 14, 14, 14,  1,  4,  6, ZSTD_dfast   },  /* level  3.*/
     { 14, 14, 14,  4,  4,  6, ZSTD_greedy  },  /* level  4.*/
index c8c8ae30110964933d8ca1ce3f5729ccb7e06cbe..d3d4bec7ee5970f3ee40bdf963c2c671ae967132 100644 (file)
@@ -689,7 +689,7 @@ static size_t ZDICT_analyzeEntropy(void*  dstBuffer, size_t maxDstSize,
     offsetCount_t bestRepOffset[ZSTD_REP_NUM+1];
     EStats_ress_t esr;
     ZSTD_parameters params;
-    U32 u, huffLog = 12, Offlog = OffFSELog, mlLog = MLFSELog, llLog = LLFSELog, total;
+    U32 u, huffLog = 11, Offlog = OffFSELog, mlLog = MLFSELog, llLog = LLFSELog, total;
     size_t pos = 0, errorCode;
     size_t eSize = 0;
     size_t const totalSrcSize = ZDICT_totalSampleSize(fileSizes, nbFiles);
index 13c4ace18d5cd3c73552d5dc605fa15c5cf47479..3a4ba4c0145d0ab859c55fe085d7802a0ef547f7 100644 (file)
@@ -16,7 +16,7 @@ Distribution of this document is unlimited.
 
 ### Version
 
-0.1.1 (15/07/16)
+0.1.2 (15/07/16)
 
 
 Introduction
@@ -518,11 +518,8 @@ using the fewest bits of any possible prefix codes for that alphabet.
 
 Prefix code must not exceed a maximum code length.
 More bits improve accuracy but cost more header size,
-and require more memory for decoding operations.
-
-The current format limits the maximum depth to 15 bits.
-The reference decoder goes further, by limiting it to 12 bits.
-It is recommended to remain compatible with reference decoder.
+and require more memory or more complex decoding operations.
+This specification limits maximum code length to 11 bits.
 
 
 ##### Representation
@@ -1168,5 +1165,6 @@ __Content__ : Where the actual dictionary content is.
 
 Version changes
 ---------------
-- 0.1.1 reserved dictID ranges
-- 0.1.0 initial release
+- 0.1.2 : limit huffman tree depth to 11 bits
+- 0.1.1 : reserved dictID ranges
+- 0.1.0 : initial release