From 9c23ea9e2be361586896af31568227aa2716447a Mon Sep 17 00:00:00 2001 From: sen Date: Tue, 11 May 2021 16:32:09 -0400 Subject: [PATCH] Bump version to 1.5.0, rebuild documentation (#2634) --- CHANGELOG | 54 +++++++++++++++ doc/zstd_manual.html | 158 ++++++++++++++++++++++++------------------- lib/zstd.h | 4 +- 3 files changed, 144 insertions(+), 72 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 9f3c8f753..197667a12 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,57 @@ +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()` + `ZSTD_compressBegin_advanced()` + `ZSTD_compressBegin_usingCDict_advanced()` + `ZSTD_initCStream_srcSize()` + `ZSTD_initCStream_usingDict()` + `ZSTD_initCStream_usingCDict()` + `ZSTD_initCStream_advanced()` + `ZSTD_initCStream_usingCDict_advanced()` + `ZSTD_resetCStream()` +perf: Significant speed improvements for middle compression levels (#2494, @senhuang42 @terrelln) +perf: Block splitter to improve compression ratio, enabled by default for high compression levels (#2447, @senhuang42) +perf: Decompression loop refactor, speed improvements on `clang` and for `--long` modes (#2614 #2630, @Cyan4973) +perf: Reduced stack usage during compression and decompression entropy stage (#2522 #2524, @terrelln) +bug: Make the number of physical CPU cores detection more robust (#2517, @PaulBone) +bug: Improve setting permissions of created files (#2525, @felixhandte) +bug: Fix large dictionary non-determinism (#2607, @terrelln) +bug: Fix various dedicated dictionary search bugs (#2540 #2586, @senhuang42 @felixhandte) +bug: Fix non-determinism test failures on Linux i686 (#2606, @terrelln) +bug: Fix UBSAN error in decompression (#2625, @terrelln) +bug: Fix superblock compression divide by zero bug (#2592, @senhuang42) +bug: Ensure `ZSTD_estimateCCtxSize*() `monotonically increases with compression level (#2538, @senhuang42) +doc: Improve `zdict.h` dictionary training API documentation (#2622, @terrelln) +doc: Note that public `ZSTD_free*()` functions accept NULL pointers (#2521, @animalize) +doc: Add style guide docs for open source contributors (#2626, @Cyan4973) +tests: Better regression test coverage for different dictionary modes (#2559, @senhuang42) +tests: Better test coverage of index reduction (#2603, @terrelln) +tests: OSS-Fuzz coverage for seekable format (#2617, @senhuang42) +tests: Test coverage for ZSTD threadpool API (#2604, @senhuang42) +build: Move `zstd_errors.h` and `zdict.h` to `lib/` root (#2597, @terrelln) +build: Allow `ZSTDMT_JOBSIZE_MIN` to be configured at compile-time, reduce default to 512KB (#2611, @Cyan4973) +build: Single file library build script moved to `build/` directory (#2618, @felixhandte) +build: `ZBUFF_*()` is no longer built by default (#2583, @senhuang42) +build: Fixed Meson build (#2548, @SupervisedThinking @kloczek) +build: Fix excessive compiler warnings with clang-cl and CMake (#2600, @nickhutchinson) +build: Detect presence of `md5` on Darwin (#2609, @felixhandte) +build: Avoid SIGBUS on armv6 (#2633, @bmwiedmann) +cli: `--progress` flag added to always display progress bar (#2595, @senhuang42) +cli: Allow reading from block devices with `--force` (#2613, @felixhandte) +cli: Fix CLI filesize display bug (#2550, @Cyan4973) +cli: Fix windows CLI `--filelist` end-of-line bug (#2620, @Cyan4973) +contrib: Various fixes for linux kernel patch (#2539, @terrelln) +contrib: Seekable format - Decompression hanging edge case fix (#2516, @senhuang42) +contrib: Seekable format - New seek table-only API (#2113 #2518, @mdittmer @Cyan4973) +contrib: Seekable format - Fix seek table descriptor check when loading (#2534, @foxeng) +contrib: Seekable format - Decompression fix for large offsets, (#2594, @azat) +misc: Automatically published release tarballs available on Github (#2535, @felixhandte) + v1.4.9 (Mar 1, 2021) bug: Use `umask()` to Constrain Created File Permissions (#2495, @felixhandte) bug: Make Simple Single-Pass Functions Ignore Advanced Parameters (#2498, @terrelln) diff --git a/doc/zstd_manual.html b/doc/zstd_manual.html index f961d4c39..5bce4d4f7 100644 --- a/doc/zstd_manual.html +++ b/doc/zstd_manual.html @@ -1,10 +1,10 @@ -zstd 1.4.9 Manual +zstd 1.5.0 Manual -

zstd 1.4.9 Manual

+

zstd 1.5.0 Manual


Contents

    @@ -12,15 +12,15 @@
  1. Version
  2. Simple API
  3. Explicit context
  4. -
  5. Advanced compression API
  6. -
  7. Advanced decompression API
  8. +
  9. Advanced compression API (Requires v1.4.0+)
  10. +
  11. Advanced decompression API (Requires v1.4.0+)
  12. Streaming
  13. Streaming compression - HowTo
  14. Streaming decompression - HowTo
  15. Simple dictionary API
  16. Bulk processing dictionary API
  17. Dictionary helper functions
  18. -
  19. Advanced dictionary and prefix API
  20. +
  21. Advanced dictionary and prefix API (Requires v1.4.0+)
  22. experimental API (static linking only)
  23. Frame size functions
  24. Memory management
  25. @@ -141,9 +141,9 @@ unsigned long long ZSTD_getFrameContentSize(const void *src, size_t srcSize); size_t ZSTD_compressBound(size_t srcSize); /*!< maximum compressed size in worst case single-pass scenario */ unsigned ZSTD_isError(size_t code); /*!< tells if a `size_t` function result is an error code */ const char* ZSTD_getErrorName(size_t code); /*!< provides readable string from an error code */ -int ZSTD_minCLevel(void); /*!< minimum negative compression level allowed */ +int ZSTD_minCLevel(void); /*!< minimum negative compression level allowed, requires v1.4.0+ */ int ZSTD_maxCLevel(void); /*!< maximum compression level available */ -int ZSTD_defaultCLevel(void); /*!< default compression level, specified by ZSTD_CLEVEL_DEFAULT */ +int ZSTD_defaultCLevel(void); /*!< default compression level, specified by ZSTD_CLEVEL_DEFAULT, requires v1.5.0+ */

    Explicit context

    
     
    @@ -158,7 +158,7 @@ int         ZSTD_defaultCLevel(void);           /*!< default compression lev
      
     
    typedef struct ZSTD_CCtx_s ZSTD_CCtx;
     ZSTD_CCtx* ZSTD_createCCtx(void);
    -size_t     ZSTD_freeCCtx(ZSTD_CCtx* cctx);
    +size_t     ZSTD_freeCCtx(ZSTD_CCtx* cctx);  /* accept NULL pointer */
     

    size_t ZSTD_compressCCtx(ZSTD_CCtx* cctx,
                              void* dst, size_t dstCapacity,
    @@ -180,7 +180,7 @@ size_t     ZSTD_freeCCtx(ZSTD_CCtx* cctx);
       Use one context per thread for parallel execution. 
     
    typedef struct ZSTD_DCtx_s ZSTD_DCtx;
     ZSTD_DCtx* ZSTD_createDCtx(void);
    -size_t     ZSTD_freeDCtx(ZSTD_DCtx* dctx);
    +size_t     ZSTD_freeDCtx(ZSTD_DCtx* dctx);  /* accept NULL pointer */
     

    size_t ZSTD_decompressDCtx(ZSTD_DCtx* dctx,
                                void* dst, size_t dstCapacity,
    @@ -191,7 +191,7 @@ size_t     ZSTD_freeDCtx(ZSTD_DCtx* dctx);
      
     


    -

    Advanced compression API

    
    +

    Advanced compression API (Requires v1.4.0+)

    
     
     
    typedef enum { ZSTD_fast=1,
                    ZSTD_dfast=2,
    @@ -206,6 +206,15 @@ size_t     ZSTD_freeDCtx(ZSTD_DCtx* dctx);
                              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
    @@ -271,10 +280,11 @@ size_t     ZSTD_freeDCtx(ZSTD_DCtx* dctx);
                                   * 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,  /* Controls how the literals are compressed (default is auto).
    -                                             * The value must be of type ZSTD_literalCompressionMode_e.
    -                                             * See ZSTD_literalCompressionMode_t enum definition for details.
    -                                             */
    +    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.
    @@ -332,7 +342,7 @@ size_t     ZSTD_freeDCtx(ZSTD_DCtx* dctx);
         ZSTD_c_jobSize=401,      /* Size of a compression job. This value is enforced only when nbWorkers >= 1.
                                   * Each compression job is completed in parallel, so this value can indirectly impact the nb of active threads.
                                   * 0 means default, which is dynamically determined based on compression parameters.
    -                              * Job size must be a minimum of overlap size, or 1 MB, whichever is largest.
    +                              * Job size must be a minimum of overlap size, or ZSTDMT_JOBSIZE_MIN (= 512 KB), whichever is largest.
                                   * The minimum size is automatically and transparently enforced. */
         ZSTD_c_overlapLog=402,   /* Control the overlap size, as a fraction of window size.
                                   * The overlap size is an amount of data reloaded from previous job at the beginning of a new job.
    @@ -361,6 +371,8 @@ size_t     ZSTD_freeDCtx(ZSTD_DCtx* dctx);
          * ZSTD_c_stableOutBuffer
          * ZSTD_c_blockDelimiters
          * ZSTD_c_validateSequences
    +     * ZSTD_c_splitBlocks
    +     * ZSTD_c_useRowMatchFinder
          * Because they are not stable, it's necessary to define ZSTD_STATIC_LINKING_ONLY to access them.
          * note : never ever use experimentalParam? names directly;
          *        also, the enums values themselves are unstable and can still change.
    @@ -375,7 +387,10 @@ size_t     ZSTD_freeDCtx(ZSTD_DCtx* dctx);
          ZSTD_c_experimentalParam9=1006,
          ZSTD_c_experimentalParam10=1007,
          ZSTD_c_experimentalParam11=1008,
    -     ZSTD_c_experimentalParam12=1009
    +     ZSTD_c_experimentalParam12=1009,
    +     ZSTD_c_experimentalParam13=1010,
    +     ZSTD_c_experimentalParam14=1011,
    +     ZSTD_c_experimentalParam15=1012
     } ZSTD_cParameter;
     

    typedef struct {
    @@ -459,7 +474,7 @@ size_t     ZSTD_freeDCtx(ZSTD_DCtx* dctx);
      
     


    -

    Advanced decompression API

    
    +

    Advanced decompression API (Requires v1.4.0+)

    
     
     
    typedef enum {
     
    @@ -590,7 +605,7 @@ size_t     ZSTD_freeDCtx(ZSTD_DCtx* dctx);
     
    typedef ZSTD_CCtx ZSTD_CStream;  /**< CCtx and CStream are now effectively same object (>= v1.3.0) */
     

    ZSTD_CStream management functions

    ZSTD_CStream* ZSTD_createCStream(void);
    -size_t ZSTD_freeCStream(ZSTD_CStream* zcs);
    +size_t ZSTD_freeCStream(ZSTD_CStream* zcs);  /* accept NULL pointer */
     

    Streaming compression functions

    typedef enum {
         ZSTD_e_continue=0, /* collect more data, encoder decides when to output compressed result, for optimal compression ratio */
    @@ -684,7 +699,7 @@ size_t ZSTD_endStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output);
     
    typedef ZSTD_DCtx ZSTD_DStream;  /**< DCtx and DStream are now effectively same object (>= v1.3.0) */
     

    ZSTD_DStream management functions

    ZSTD_DStream* ZSTD_createDStream(void);
    -size_t ZSTD_freeDStream(ZSTD_DStream* zds);
    +size_t ZSTD_freeDStream(ZSTD_DStream* zds);  /* accept NULL pointer */
     

    Streaming decompression functions


    size_t ZSTD_DStreamInSize(void);    /*!< recommended size for input buffer */
    @@ -700,7 +715,7 @@ size_t ZSTD_freeDStream(ZSTD_DStream* zds);
                                    int compressionLevel);
     

    Compression at an explicit compression level using a Dictionary. A dictionary can be any arbitrary data segment (also called a prefix), - or a buffer with specified information (see dictBuilder/zdict.h). + or a buffer with specified information (see zdict.h). Note : This function loads the dictionary, resulting in significant startup delay. It's intended for a dictionary used only once. Note 2 : When `dict == NULL || dictSize < 8` no dictionary is used. @@ -735,7 +750,8 @@ size_t ZSTD_freeDStream(ZSTD_DStream* zds);


    size_t      ZSTD_freeCDict(ZSTD_CDict* CDict);
    -

    Function frees memory allocated by ZSTD_createCDict(). +

    Function frees memory allocated by ZSTD_createCDict(). + If a NULL pointer is passed, no operation is performed.


    size_t ZSTD_compress_usingCDict(ZSTD_CCtx* cctx,
    @@ -754,7 +770,8 @@ size_t ZSTD_freeDStream(ZSTD_DStream* zds);
     


    size_t      ZSTD_freeDDict(ZSTD_DDict* ddict);
    -

    Function frees memory allocated with ZSTD_createDDict() +

    Function frees memory allocated with ZSTD_createDDict() + If a NULL pointer is passed, no operation is performed.


    size_t ZSTD_decompress_usingDDict(ZSTD_DCtx* dctx,
    @@ -776,7 +793,7 @@ size_t ZSTD_freeDStream(ZSTD_DStream* zds);
     
    unsigned ZSTD_getDictID_fromCDict(const ZSTD_CDict* cdict);
     

    Provides the dictID of the dictionary loaded into `cdict`. If @return == 0, the dictionary is not conformant to Zstandard specification, or empty. - Non-conformant dictionaries can still be loaded, but as content-only dictionaries. + Non-conformant dictionaries can still be loaded, but as content-only dictionaries.


    unsigned ZSTD_getDictID_fromDDict(const ZSTD_DDict* ddict);
    @@ -797,7 +814,7 @@ size_t ZSTD_freeDStream(ZSTD_DStream* zds);
       When identifying the exact failure cause, it's possible to use ZSTD_getFrameHeader(), which will provide a more precise error code. 
     


    -

    Advanced dictionary and prefix API

    +

    Advanced dictionary and prefix API (Requires v1.4.0+)

      This API allows dictionaries to be used with ZSTD_compress2(),
      ZSTD_compressStream2(), and ZSTD_decompress(). Dictionaries are sticky, and
      only reset with the context is reset with ZSTD_reset_parameters or
    @@ -1059,13 +1076,10 @@ size_t ZSTD_sizeof_DDict(const ZSTD_DDict* ddict);
     } 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;
    +  ZSTD_urm_auto = 0,                   /* Automatically determine whether or not we use row matchfinder */
    +  ZSTD_urm_disableRowMatchFinder = 1,  /* Never use row matchfinder */
    +  ZSTD_urm_enableRowMatchFinder = 2    /* Always use row matchfinder when applicable */
    +} ZSTD_useRowMatchFinderMode_e;
     

    Frame size functions

    
     
    @@ -1326,24 +1340,26 @@ ZSTD_customMem const ZSTD_defaultCMem = { NULL, NULL, NULL };  
    /**< this con This function never fails (wide contract)


    -
    size_t ZSTD_compress_advanced(ZSTD_CCtx* cctx,
    +
    ZSTD_DEPRECATED("use ZSTD_compress2")
    +size_t ZSTD_compress_advanced(ZSTD_CCtx* cctx,
                                   void* dst, size_t dstCapacity,
                             const void* src, size_t srcSize,
                             const void* dict,size_t dictSize,
                                   ZSTD_parameters params);
     

    Note : this function is now DEPRECATED. It can be replaced by ZSTD_compress2(), in combination with ZSTD_CCtx_setParameter() and other parameter setters. - This prototype will be marked as deprecated and generate compilation warning on reaching v1.5.x + This prototype will generate compilation warnings.


    -
    size_t ZSTD_compress_usingCDict_advanced(ZSTD_CCtx* cctx,
    +
    ZSTD_DEPRECATED("use ZSTD_compress2 with ZSTD_CCtx_loadDictionary")
    +size_t ZSTD_compress_usingCDict_advanced(ZSTD_CCtx* cctx,
                                       void* dst, size_t dstCapacity,
                                 const void* src, size_t srcSize,
                                 const ZSTD_CDict* cdict,
                                       ZSTD_frameParameters fParams);
    -

    Note : this function is now REDUNDANT. +

    Note : this function is now DEPRECATED. It can be replaced by ZSTD_compress2(), in combination with ZSTD_CCtx_loadDictionary() and other parameter setters. - This prototype will be marked as deprecated and generate compilation warning in some future version + This prototype will generate compilation warnings.


    size_t ZSTD_CCtx_loadDictionary_byReference(ZSTD_CCtx* cctx, const void* dict, size_t dictSize);
    @@ -1370,7 +1386,7 @@ ZSTD_customMem const ZSTD_defaultCMem = { NULL, NULL, NULL };  /**< this con
     


    ZSTD_CCtx_params* ZSTD_createCCtxParams(void);
    -size_t ZSTD_freeCCtxParams(ZSTD_CCtx_params* params);
    +size_t ZSTD_freeCCtxParams(ZSTD_CCtx_params* params);  /* accept NULL pointer */
     

    Quick howto : - ZSTD_createCCtxParams() : Create a ZSTD_CCtx_params structure - ZSTD_CCtxParams_setParameter() : Push parameters one by one into @@ -1382,7 +1398,7 @@ size_t ZSTD_freeCCtxParams(ZSTD_CCtx_params* params); These parameters will be applied to all subsequent frames. - ZSTD_compressStream2() : Do compression using the CCtx. - - ZSTD_freeCCtxParams() : Free the memory. + - ZSTD_freeCCtxParams() : Free the memory, accept NULL pointer. This can be used with ZSTD_estimateCCtxSize_advanced_usingCCtxParams() for static allocation of CCtx for single-threaded compression. @@ -1496,8 +1512,10 @@ size_t ZSTD_freeCCtxParams(ZSTD_CCtx_params* params);


    -
    size_t ZSTD_DCtx_setFormat(ZSTD_DCtx* dctx, ZSTD_format_e format);
    -

    Instruct the decoder context about what kind of data to decode next. +

    ZSTD_DEPRECATED("use ZSTD_DCtx_setParameter() instead")
    +size_t ZSTD_DCtx_setFormat(ZSTD_DCtx* dctx, ZSTD_format_e format);
    +

    This function is REDUNDANT. Prefer ZSTD_DCtx_setParameter(). + Instruct the decoder context about what kind of data to decode next. This instruction is mandatory to decode data without a fully-formed header, such ZSTD_f_zstd1_magicless for example. @return : 0, or an error code (which can be tested using ZSTD_isError()). @@ -1520,11 +1538,11 @@ size_t ZSTD_freeCCtxParams(ZSTD_CCtx_params* params);

    Advanced Streaming compression functions


    -
    size_t
    -ZSTD_initCStream_srcSize(ZSTD_CStream* zcs,
    +
    ZSTD_DEPRECATED("use ZSTD_CCtx_reset, see zstd.h for detailed instructions")
    +size_t ZSTD_initCStream_srcSize(ZSTD_CStream* zcs,
                  int compressionLevel,
                  unsigned long long pledgedSrcSize);
    -

    This function is deprecated, and equivalent to: +

    This function is DEPRECATED, and equivalent to: ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); ZSTD_CCtx_refCDict(zcs, NULL); // clear the dictionary (if any) ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel); @@ -1533,15 +1551,15 @@ ZSTD_initCStream_srcSize(ZSTD_CStream* zcs, pledgedSrcSize must be correct. If it is not known at init time, use ZSTD_CONTENTSIZE_UNKNOWN. Note that, for compatibility with older programs, "0" also disables frame content size field. It may be enabled in the future. - Note : this prototype will be marked as deprecated and generate compilation warnings on reaching v1.5.x + This prototype will generate compilation warnings.


    -
    size_t
    -ZSTD_initCStream_usingDict(ZSTD_CStream* zcs,
    +
    ZSTD_DEPRECATED("use ZSTD_CCtx_reset, see zstd.h for detailed instructions")
    +size_t ZSTD_initCStream_usingDict(ZSTD_CStream* zcs,
              const void* dict, size_t dictSize,
                    int compressionLevel);
    -

    This function is deprecated, and is equivalent to: +

    This function is DEPRECATED, and is equivalent to: ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel); ZSTD_CCtx_loadDictionary(zcs, dict, dictSize); @@ -1550,16 +1568,16 @@ ZSTD_initCStream_usingDict(ZSTD_CStream* zcs, dict == NULL or dictSize < 8, in which case no dict is used. Note: dict is loaded with ZSTD_dct_auto (treated as a full zstd dictionary if it begins with ZSTD_MAGIC_DICTIONARY, else as raw content) and ZSTD_dlm_byCopy. - Note : this prototype will be marked as deprecated and generate compilation warnings on reaching v1.5.x + This prototype will generate compilation warnings.


    -
    size_t
    -ZSTD_initCStream_advanced(ZSTD_CStream* zcs,
    +
    ZSTD_DEPRECATED("use ZSTD_CCtx_reset, see zstd.h for detailed instructions")
    +size_t ZSTD_initCStream_advanced(ZSTD_CStream* zcs,
             const void* dict, size_t dictSize,
                   ZSTD_parameters params,
                   unsigned long long pledgedSrcSize);
    -

    This function is deprecated, and is approximately equivalent to: +

    This function is DEPRECATED, and is approximately equivalent to: ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); // Pseudocode: Set each zstd parameter and leave the rest as-is. for ((param, value) : params) { @@ -1571,22 +1589,23 @@ ZSTD_initCStream_advanced(ZSTD_CStream* zcs, dict is loaded with ZSTD_dct_auto and ZSTD_dlm_byCopy. pledgedSrcSize must be correct. If srcSize is not known at init time, use value ZSTD_CONTENTSIZE_UNKNOWN. - Note : this prototype will be marked as deprecated and generate compilation warnings on reaching v1.5.x + This prototype will generate compilation warnings.


    -
    size_t ZSTD_initCStream_usingCDict(ZSTD_CStream* zcs, const ZSTD_CDict* cdict);
    -

    This function is deprecated, and equivalent to: +

    ZSTD_DEPRECATED("use ZSTD_CCtx_reset and ZSTD_CCtx_refCDict, see zstd.h for detailed instructions")
    +size_t ZSTD_initCStream_usingCDict(ZSTD_CStream* zcs, const ZSTD_CDict* cdict);
    +

    This function is DEPRECATED, and equivalent to: ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); ZSTD_CCtx_refCDict(zcs, cdict); - + note : cdict will just be referenced, and must outlive compression session - Note : this prototype will be marked as deprecated and generate compilation warnings on reaching v1.5.x + This prototype will generate compilation warnings.


    -
    size_t
    -ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs,
    +
    ZSTD_DEPRECATED("use ZSTD_CCtx_reset and ZSTD_CCtx_refCDict, see zstd.h for detailed instructions")
    +size_t ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs,
                        const ZSTD_CDict* cdict,
                              ZSTD_frameParameters fParams,
                              unsigned long long pledgedSrcSize);
    @@ -1602,18 +1621,18 @@ ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs,
      same as ZSTD_initCStream_usingCDict(), with control over frame parameters.
      pledgedSrcSize must be correct. If srcSize is not known at init time, use
      value ZSTD_CONTENTSIZE_UNKNOWN.
    - Note : this prototype will be marked as deprecated and generate compilation warnings on reaching v1.5.x
    + This prototype will generate compilation warnings.
      
     


    -
    size_t ZSTD_resetCStream(ZSTD_CStream* zcs, unsigned long long pledgedSrcSize);
    -

    This function is deprecated, and is equivalent to: +

    ZSTD_DEPRECATED("use ZSTD_CCtx_reset, see zstd.h for detailed instructions")
    +size_t ZSTD_resetCStream(ZSTD_CStream* zcs, unsigned long long pledgedSrcSize);
    +

    This function is DEPRECATED, and is equivalent to: ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only); ZSTD_CCtx_setPledgedSrcSize(zcs, pledgedSrcSize); - - Note: ZSTD_resetCStream() interprets pledgedSrcSize == 0 as ZSTD_CONTENTSIZE_UNKNOWN, but - ZSTD_CCtx_setPledgedSrcSize() does not do the same, so ZSTD_CONTENTSIZE_UNKNOWN must be - explicitly specified. + Note: ZSTD_resetCStream() interprets pledgedSrcSize == 0 as ZSTD_CONTENTSIZE_UNKNOWN, but + ZSTD_CCtx_setPledgedSrcSize() does not do the same, so ZSTD_CONTENTSIZE_UNKNOWN must be + explicitly specified. start a new frame, using same parameters from previous frame. This is typically useful to skip dictionary loading stage, since it will re-use it in-place. @@ -1623,7 +1642,7 @@ ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs, For the time being, pledgedSrcSize==0 is interpreted as "srcSize unknown" for compatibility with older programs, but it will change to mean "empty" in future version, so use macro ZSTD_CONTENTSIZE_UNKNOWN instead. @return : 0, or an error code (which can be tested using ZSTD_isError()) - Note : this prototype will be marked as deprecated and generate compilation warnings on reaching v1.5.x + This prototype will generate compilation warnings.


    @@ -1694,8 +1713,7 @@ ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs, ZSTD_CCtx object can be re-used multiple times within successive compression operations. Start by initializing a context. - Use ZSTD_compressBegin(), or ZSTD_compressBegin_usingDict() for dictionary compression, - or ZSTD_compressBegin_advanced(), for finer parameter control. + Use ZSTD_compressBegin(), or ZSTD_compressBegin_usingDict() for dictionary compression. It's also possible to duplicate a reference context which has already been initialized, using ZSTD_copyCCtx() Then, consume your input using ZSTD_compressContinue(). @@ -1719,11 +1737,11 @@ ZSTD_initCStream_usingCDict_advanced(ZSTD_CStream* zcs,

    Buffer-less streaming compression functions

    size_t ZSTD_compressBegin(ZSTD_CCtx* cctx, int compressionLevel);
     size_t ZSTD_compressBegin_usingDict(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, int compressionLevel);
    -size_t ZSTD_compressBegin_advanced(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, ZSTD_parameters params, unsigned long long pledgedSrcSize); /**< pledgedSrcSize : If srcSize is not known at init time, use ZSTD_CONTENTSIZE_UNKNOWN */
     size_t ZSTD_compressBegin_usingCDict(ZSTD_CCtx* cctx, const ZSTD_CDict* cdict); /**< note: fails if cdict==NULL */
    -size_t ZSTD_compressBegin_usingCDict_advanced(ZSTD_CCtx* const cctx, const ZSTD_CDict* const cdict, ZSTD_frameParameters const fParams, unsigned long long const pledgedSrcSize);   /* compression parameters are already set within cdict. pledgedSrcSize must be correct. If srcSize is not known, use macro ZSTD_CONTENTSIZE_UNKNOWN */
     size_t ZSTD_copyCCtx(ZSTD_CCtx* cctx, const ZSTD_CCtx* preparedCCtx, unsigned long long pledgedSrcSize); /**<  note: if pledgedSrcSize is not known, use ZSTD_CONTENTSIZE_UNKNOWN */
     

    +
    size_t ZSTD_compressBegin_advanced(ZSTD_CCtx* cctx, const void* dict, size_t dictSize, ZSTD_parameters params, unsigned long long pledgedSrcSize); /**< pledgedSrcSize : If srcSize is not known at init time, use ZSTD_CONTENTSIZE_UNKNOWN */
    +

    Buffer-less streaming decompression (synchronous mode)

       A ZSTD_DCtx object is required to track streaming operations.
       Use ZSTD_createDCtx() / ZSTD_freeDCtx() to manage it.
    diff --git a/lib/zstd.h b/lib/zstd.h
    index fbc4a98d4..f479a5200 100644
    --- a/lib/zstd.h
    +++ b/lib/zstd.h
    @@ -71,8 +71,8 @@ extern "C" {
     
     /*------   Version   ------*/
     #define ZSTD_VERSION_MAJOR    1
    -#define ZSTD_VERSION_MINOR    4
    -#define ZSTD_VERSION_RELEASE  10
    +#define ZSTD_VERSION_MINOR    5
    +#define ZSTD_VERSION_RELEASE  0
     #define ZSTD_VERSION_NUMBER  (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE)
     
     /*! ZSTD_versionNumber() :
    -- 
    2.47.2