diff --git a/CHANGELOG b/CHANGELOG index 6f45ecfa157..44ddf327224 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,7 +2,6 @@ v1.5.0 (May 11, 2021) api: Various functions and parameters promoted from experimental to stable API: (#2579-2581, @senhuang42) `ZSTD_defaultCLevel()` `ZSTD_getDictID_fromCDict()` - `ZSTD_c_literalCompressionMode` api: Several experimental functions have been deprecated and will emit a compiler warning (#2582, @senhuang42) `ZSTD_compress_advanced()` `ZSTD_compress_usingCDict_advanced()` diff --git a/doc/zstd_manual.html b/doc/zstd_manual.html index 5bce4d4f721..010f10a015f 100644 --- a/doc/zstd_manual.html +++ b/doc/zstd_manual.html @@ -206,15 +206,6 @@

Decompression context

  When decompressing many times,
                          Only the order (from fast to strong) is guaranteed */
 } ZSTD_strategy;
 

-
typedef enum {
-  ZSTD_lcm_auto = 0,          /**< Automatically determine the compression mode based on the compression level.
-                               *   Negative compression levels will be uncompressed, and positive compression
-                               *   levels will be compressed. */
-  ZSTD_lcm_huffman = 1,       /**< Always attempt Huffman compression. Uncompressed literals will still be
-                               *   emitted if Huffman compression is not profitable. */
-  ZSTD_lcm_uncompressed = 2   /**< Always emit uncompressed literals. */
-} ZSTD_literalCompressionMode_e;  /* Requires v1.5.0+ */
-

typedef enum {
 
     /* compression parameters
@@ -280,12 +271,6 @@ 

Decompression context

  When decompressing many times,
                               * The higher the value of selected strategy, the more complex it is,
                               * resulting in stronger and slower compression.
                               * Special: value 0 means "use default strategy". */
-    ZSTD_c_literalCompressionMode=108,  /* Note : requires v1.5.0+
-                                         * Controls how the literals are compressed (default is auto).
-                                         * The value must be of type ZSTD_literalCompressionMode_e.
-                                         * See ZSTD_literalCompressionMode_e enum definition for details.
-                                         */
-
     /* LDM mode parameters */
     ZSTD_c_enableLongDistanceMatching=160, /* Enable long distance matching.
                                      * This parameter is designed to improve compression ratio
@@ -364,6 +349,7 @@ 

Decompression context

  When decompressing many times,
      * ZSTD_c_format
      * ZSTD_c_forceMaxWindow
      * ZSTD_c_forceAttachDict
+     * ZSTD_c_literalCompressionMode
      * ZSTD_c_targetCBlockSize
      * ZSTD_c_srcSizeHint
      * ZSTD_c_enableDedicatedDictSearch
@@ -381,6 +367,7 @@ 

Decompression context

  When decompressing many times,
      ZSTD_c_experimentalParam2=10,
      ZSTD_c_experimentalParam3=1000,
      ZSTD_c_experimentalParam4=1001,
+     ZSTD_c_experimentalParam5=1002,
      ZSTD_c_experimentalParam6=1003,
      ZSTD_c_experimentalParam7=1004,
      ZSTD_c_experimentalParam8=1005,
@@ -1075,6 +1062,15 @@ 

Streaming decompression functions


ZSTD_dictForceLoad = 3
/* Always reload the dictionary */ } ZSTD_dictAttachPref_e;

+
typedef enum {
+  ZSTD_lcm_auto = 0,          /**< Automatically determine the compression mode based on the compression level.
+                               *   Negative compression levels will be uncompressed, and positive compression
+                               *   levels will be compressed. */
+  ZSTD_lcm_huffman = 1,       /**< Always attempt Huffman compression. Uncompressed literals will still be
+                               *   emitted if Huffman compression is not profitable. */
+  ZSTD_lcm_uncompressed = 2   /**< Always emit uncompressed literals. */
+} ZSTD_literalCompressionMode_e;
+

typedef enum {
   ZSTD_urm_auto = 0,                   /* Automatically determine whether or not we use row matchfinder */
   ZSTD_urm_disableRowMatchFinder = 1,  /* Never use row matchfinder */
diff --git a/lib/zstd.h b/lib/zstd.h
index f479a520088..4651e6c4dc7 100644
--- a/lib/zstd.h
+++ b/lib/zstd.h
@@ -266,15 +266,6 @@ typedef enum { ZSTD_fast=1,
                          Only the order (from fast to strong) is guaranteed */
 } ZSTD_strategy;
 
-typedef enum {
-  ZSTD_lcm_auto = 0,          /**< Automatically determine the compression mode based on the compression level.
-                               *   Negative compression levels will be uncompressed, and positive compression
-                               *   levels will be compressed. */
-  ZSTD_lcm_huffman = 1,       /**< Always attempt Huffman compression. Uncompressed literals will still be
-                               *   emitted if Huffman compression is not profitable. */
-  ZSTD_lcm_uncompressed = 2   /**< Always emit uncompressed literals. */
-} ZSTD_literalCompressionMode_e;  /* Requires v1.5.0+ */
-
 typedef enum {
 
     /* compression parameters
@@ -340,12 +331,6 @@ typedef enum {
                               * The higher the value of selected strategy, the more complex it is,
                               * resulting in stronger and slower compression.
                               * Special: value 0 means "use default strategy". */
-    ZSTD_c_literalCompressionMode=108,  /* Note : requires v1.5.0+
-                                         * Controls how the literals are compressed (default is auto).
-                                         * The value must be of type ZSTD_literalCompressionMode_e.
-                                         * See ZSTD_literalCompressionMode_e enum definition for details.
-                                         */
-
     /* LDM mode parameters */
     ZSTD_c_enableLongDistanceMatching=160, /* Enable long distance matching.
                                      * This parameter is designed to improve compression ratio
@@ -424,6 +409,7 @@ typedef enum {
      * ZSTD_c_format
      * ZSTD_c_forceMaxWindow
      * ZSTD_c_forceAttachDict
+     * ZSTD_c_literalCompressionMode
      * ZSTD_c_targetCBlockSize
      * ZSTD_c_srcSizeHint
      * ZSTD_c_enableDedicatedDictSearch
@@ -441,6 +427,7 @@ typedef enum {
      ZSTD_c_experimentalParam2=10,
      ZSTD_c_experimentalParam3=1000,
      ZSTD_c_experimentalParam4=1001,
+     ZSTD_c_experimentalParam5=1002,
      ZSTD_c_experimentalParam6=1003,
      ZSTD_c_experimentalParam7=1004,
      ZSTD_c_experimentalParam8=1005,
@@ -1305,6 +1292,15 @@ typedef enum {
     ZSTD_dictForceLoad     = 3  /* Always reload the dictionary */
 } ZSTD_dictAttachPref_e;
 
+typedef enum {
+  ZSTD_lcm_auto = 0,          /**< Automatically determine the compression mode based on the compression level.
+                               *   Negative compression levels will be uncompressed, and positive compression
+                               *   levels will be compressed. */
+  ZSTD_lcm_huffman = 1,       /**< Always attempt Huffman compression. Uncompressed literals will still be
+                               *   emitted if Huffman compression is not profitable. */
+  ZSTD_lcm_uncompressed = 2   /**< Always emit uncompressed literals. */
+} ZSTD_literalCompressionMode_e;
+
 typedef enum {
   ZSTD_urm_auto = 0,                   /* Automatically determine whether or not we use row matchfinder */
   ZSTD_urm_disableRowMatchFinder = 1,  /* Never use row matchfinder */
@@ -1716,6 +1712,12 @@ ZSTDLIB_API size_t ZSTD_CCtx_refPrefix_advanced(ZSTD_CCtx* cctx, const void* pre
  * See the comments on that enum for an explanation of the feature. */
 #define ZSTD_c_forceAttachDict ZSTD_c_experimentalParam4
 
+/* Controls how the literals are compressed (default is auto).
+ * The value must be of type ZSTD_literalCompressionMode_e.
+ * See ZSTD_literalCompressionMode_e enum definition for details.
+ */
+#define ZSTD_c_literalCompressionMode ZSTD_c_experimentalParam5
+
 /* Tries to fit compressed block size to be around targetCBlockSize.
  * No target when targetCBlockSize == 0.
  * There is no guarantee on compressed block size (default:0) */
diff --git a/tests/fuzzer.c b/tests/fuzzer.c
index b4b2b6f75f1..0a9cb7c2a7c 100644
--- a/tests/fuzzer.c
+++ b/tests/fuzzer.c
@@ -340,11 +340,11 @@ static void FUZ_decodeSequences(BYTE* dst, ZSTD_Sequence* seqs, size_t seqsSize,
 typedef struct {
     ZSTD_CCtx* cctx;
     ZSTD_threadPool* pool;
-    void* const CNBuffer;
+    void* CNBuffer;
     size_t CNBuffSize;
-    void* const compressedBuffer;
+    void* compressedBuffer;
     size_t compressedBufferSize;
-    void* const decodedBuffer;
+    void* decodedBuffer;
     int err;
 } threadPoolTests_compressionJob_payload;