zstdlib 0.14.0-x86-mingw32 → 0.15.0-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +5 -0
- data/ext/zstdlib_c/extconf.rb +1 -1
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/bits.h +92 -87
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/bitstream.h +26 -29
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/compiler.h +36 -22
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/cpu.h +1 -1
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/debug.h +0 -9
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/error_private.c +1 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/error_private.h +0 -10
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/fse.h +2 -17
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/fse_decompress.c +2 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/huf.h +0 -9
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/mem.h +7 -11
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/pool.h +0 -9
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/portability_macros.h +22 -9
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/threading.h +0 -8
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/xxhash.h +93 -19
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/zstd_deps.h +12 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/zstd_internal.h +1 -69
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/zstd_trace.h +5 -12
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/hist.c +10 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/hist.h +7 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_compress.c +1057 -367
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_compress_internal.h +227 -125
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_compress_literals.c +1 -1
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_compress_sequences.c +7 -7
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_compress_sequences.h +7 -6
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_compress_superblock.c +17 -17
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_cwksp.h +41 -24
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_double_fast.c +58 -50
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_double_fast.h +4 -12
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_fast.c +91 -74
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_fast.h +4 -12
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_lazy.c +64 -64
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_lazy.h +30 -39
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_ldm.c +48 -33
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_ldm.h +6 -14
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_opt.c +55 -51
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_opt.h +8 -16
- data/ext/zstdlib_c/zstd-1.5.7/lib/compress/zstd_preSplit.c +238 -0
- data/ext/zstdlib_c/zstd-1.5.7/lib/compress/zstd_preSplit.h +33 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstdmt_compress.c +134 -93
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstdmt_compress.h +4 -15
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/decompress/huf_decompress_amd64.S +10 -3
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/decompress/zstd_decompress.c +14 -11
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/decompress/zstd_decompress_block.c +6 -12
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/decompress/zstd_decompress_internal.h +5 -5
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/zdict.h +15 -8
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/zstd.h +241 -132
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/zstd_errors.h +1 -8
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/zlibWrapper/gzwrite.c +2 -1
- data/lib/2.4/zstdlib_c.so +0 -0
- data/lib/2.5/zstdlib_c.so +0 -0
- data/lib/2.6/zstdlib_c.so +0 -0
- data/lib/2.7/zstdlib_c.so +0 -0
- data/lib/3.0/zstdlib_c.so +0 -0
- data/lib/3.1/zstdlib_c.so +0 -0
- data/lib/3.2/zstdlib_c.so +0 -0
- data/lib/3.3/zstdlib_c.so +0 -0
- data/lib/3.4/zstdlib_c.so +0 -0
- metadata +75 -73
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/allocations.h +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/debug.c +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/entropy_common.c +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/pool.c +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/threading.c +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/xxhash.c +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/common/zstd_common.c +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/clevels.h +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/fse_compress.c +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/huf_compress.c +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_compress_literals.h +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_compress_superblock.h +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/compress/zstd_ldm_geartab.h +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/decompress/huf_decompress.c +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/decompress/zstd_ddict.c +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/decompress/zstd_ddict.h +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/lib/decompress/zstd_decompress_block.h +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/zlibWrapper/gzclose.c +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/zlibWrapper/gzcompatibility.h +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/zlibWrapper/gzguts.h +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/zlibWrapper/gzlib.c +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/zlibWrapper/gzread.c +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/zlibWrapper/zstd_zlibwrapper.c +0 -0
- data/ext/zstdlib_c/{zstd-1.5.6 → zstd-1.5.7}/zlibWrapper/zstd_zlibwrapper.h +5 -5
| @@ -444,7 +444,7 @@ size_t ZSTD_frameHeaderSize(const void* src, size_t srcSize) | |
| 444 444 | 
             
             * @return : 0, `zfhPtr` is correctly filled,
         | 
| 445 445 | 
             
             *          >0, `srcSize` is too small, value is wanted `srcSize` amount,
         | 
| 446 446 | 
             
            **           or an error code, which can be tested using ZSTD_isError() */
         | 
| 447 | 
            -
            size_t ZSTD_getFrameHeader_advanced( | 
| 447 | 
            +
            size_t ZSTD_getFrameHeader_advanced(ZSTD_FrameHeader* zfhPtr, const void* src, size_t srcSize, ZSTD_format_e format)
         | 
| 448 448 | 
             
            {
         | 
| 449 449 | 
             
                const BYTE* ip = (const BYTE*)src;
         | 
| 450 450 | 
             
                size_t const minInputSize = ZSTD_startingInputLength(format);
         | 
| @@ -484,8 +484,10 @@ size_t ZSTD_getFrameHeader_advanced(ZSTD_frameHeader* zfhPtr, const void* src, s | |
| 484 484 | 
             
                        if (srcSize < ZSTD_SKIPPABLEHEADERSIZE)
         | 
| 485 485 | 
             
                            return ZSTD_SKIPPABLEHEADERSIZE; /* magic number + frame length */
         | 
| 486 486 | 
             
                        ZSTD_memset(zfhPtr, 0, sizeof(*zfhPtr));
         | 
| 487 | 
            -
                        zfhPtr->frameContentSize = MEM_readLE32((const char *)src + ZSTD_FRAMEIDSIZE);
         | 
| 488 487 | 
             
                        zfhPtr->frameType = ZSTD_skippableFrame;
         | 
| 488 | 
            +
                        zfhPtr->dictID = MEM_readLE32(src) - ZSTD_MAGIC_SKIPPABLE_START;
         | 
| 489 | 
            +
                        zfhPtr->headerSize = ZSTD_SKIPPABLEHEADERSIZE;
         | 
| 490 | 
            +
                        zfhPtr->frameContentSize = MEM_readLE32((const char *)src + ZSTD_FRAMEIDSIZE);
         | 
| 489 491 | 
             
                        return 0;
         | 
| 490 492 | 
             
                    }
         | 
| 491 493 | 
             
                    RETURN_ERROR(prefix_unknown, "");
         | 
| @@ -554,7 +556,7 @@ size_t ZSTD_getFrameHeader_advanced(ZSTD_frameHeader* zfhPtr, const void* src, s | |
| 554 556 | 
             
             * @return : 0, `zfhPtr` is correctly filled,
         | 
| 555 557 | 
             
             *          >0, `srcSize` is too small, value is wanted `srcSize` amount,
         | 
| 556 558 | 
             
             *           or an error code, which can be tested using ZSTD_isError() */
         | 
| 557 | 
            -
            size_t ZSTD_getFrameHeader( | 
| 559 | 
            +
            size_t ZSTD_getFrameHeader(ZSTD_FrameHeader* zfhPtr, const void* src, size_t srcSize)
         | 
| 558 560 | 
             
            {
         | 
| 559 561 | 
             
                return ZSTD_getFrameHeader_advanced(zfhPtr, src, srcSize, ZSTD_f_zstd1);
         | 
| 560 562 | 
             
            }
         | 
| @@ -572,7 +574,7 @@ unsigned long long ZSTD_getFrameContentSize(const void *src, size_t srcSize) | |
| 572 574 | 
             
                    return ret == 0 ? ZSTD_CONTENTSIZE_UNKNOWN : ret;
         | 
| 573 575 | 
             
                }
         | 
| 574 576 | 
             
            #endif
         | 
| 575 | 
            -
                {    | 
| 577 | 
            +
                {   ZSTD_FrameHeader zfh;
         | 
| 576 578 | 
             
                    if (ZSTD_getFrameHeader(&zfh, src, srcSize) != 0)
         | 
| 577 579 | 
             
                        return ZSTD_CONTENTSIZE_ERROR;
         | 
| 578 580 | 
             
                    if (zfh.frameType == ZSTD_skippableFrame) {
         | 
| @@ -750,7 +752,7 @@ static ZSTD_frameSizeInfo ZSTD_findFrameSizeInfo(const void* src, size_t srcSize | |
| 750 752 | 
             
                    const BYTE* const ipstart = ip;
         | 
| 751 753 | 
             
                    size_t remainingSize = srcSize;
         | 
| 752 754 | 
             
                    size_t nbBlocks = 0;
         | 
| 753 | 
            -
                     | 
| 755 | 
            +
                    ZSTD_FrameHeader zfh;
         | 
| 754 756 |  | 
| 755 757 | 
             
                    /* Extract Frame Header */
         | 
| 756 758 | 
             
                    {   size_t const ret = ZSTD_getFrameHeader_advanced(&zfh, src, srcSize, format);
         | 
| @@ -811,7 +813,7 @@ size_t ZSTD_findFrameCompressedSize(const void *src, size_t srcSize) | |
| 811 813 |  | 
| 812 814 | 
             
            /** ZSTD_decompressBound() :
         | 
| 813 815 | 
             
             *  compatible with legacy mode
         | 
| 814 | 
            -
             *  `src` must point to the start of a ZSTD frame or a  | 
| 816 | 
            +
             *  `src` must point to the start of a ZSTD frame or a skippable frame
         | 
| 815 817 | 
             
             *  `srcSize` must be at least as large as the frame contained
         | 
| 816 818 | 
             
             *  @return : the maximum decompressed size of the compressed source
         | 
| 817 819 | 
             
             */
         | 
| @@ -843,7 +845,7 @@ size_t ZSTD_decompressionMargin(void const* src, size_t srcSize) | |
| 843 845 | 
             
                    ZSTD_frameSizeInfo const frameSizeInfo = ZSTD_findFrameSizeInfo(src, srcSize, ZSTD_f_zstd1);
         | 
| 844 846 | 
             
                    size_t const compressedSize = frameSizeInfo.compressedSize;
         | 
| 845 847 | 
             
                    unsigned long long const decompressedBound = frameSizeInfo.decompressedBound;
         | 
| 846 | 
            -
                     | 
| 848 | 
            +
                    ZSTD_FrameHeader zfh;
         | 
| 847 849 |  | 
| 848 850 | 
             
                    FORWARD_IF_ERROR(ZSTD_getFrameHeader(&zfh, src, srcSize), "");
         | 
| 849 851 | 
             
                    if (ZSTD_isError(compressedSize) || decompressedBound == ZSTD_CONTENTSIZE_ERROR)
         | 
| @@ -917,7 +919,7 @@ static size_t ZSTD_setRleBlock(void* dst, size_t dstCapacity, | |
| 917 919 | 
             
                return regenSize;
         | 
| 918 920 | 
             
            }
         | 
| 919 921 |  | 
| 920 | 
            -
            static void ZSTD_DCtx_trace_end(ZSTD_DCtx const* dctx, U64 uncompressedSize, U64 compressedSize,  | 
| 922 | 
            +
            static void ZSTD_DCtx_trace_end(ZSTD_DCtx const* dctx, U64 uncompressedSize, U64 compressedSize, int streaming)
         | 
| 921 923 | 
             
            {
         | 
| 922 924 | 
             
            #if ZSTD_TRACE
         | 
| 923 925 | 
             
                if (dctx->traceCtx && ZSTD_trace_decompress_end != NULL) {
         | 
| @@ -1057,7 +1059,7 @@ static size_t ZSTD_decompressFrame(ZSTD_DCtx* dctx, | |
| 1057 1059 | 
             
                }
         | 
| 1058 1060 | 
             
                ZSTD_DCtx_trace_end(dctx, (U64)(op-ostart), (U64)(ip-istart), /* streaming */ 0);
         | 
| 1059 1061 | 
             
                /* Allow caller to get size read */
         | 
| 1060 | 
            -
                DEBUGLOG(4, "ZSTD_decompressFrame: decompressed frame of size % | 
| 1062 | 
            +
                DEBUGLOG(4, "ZSTD_decompressFrame: decompressed frame of size %i, consuming %i bytes of input", (int)(op-ostart), (int)(ip - (const BYTE*)*srcPtr));
         | 
| 1061 1063 | 
             
                *srcPtr = ip;
         | 
| 1062 1064 | 
             
                *srcSizePtr = remainingSrcSize;
         | 
| 1063 1065 | 
             
                return (size_t)(op-ostart);
         | 
| @@ -1641,7 +1643,7 @@ unsigned ZSTD_getDictID_fromDict(const void* dict, size_t dictSize) | |
| 1641 1643 | 
             
             *  ZSTD_getFrameHeader(), which will provide a more precise error code. */
         | 
| 1642 1644 | 
             
            unsigned ZSTD_getDictID_fromFrame(const void* src, size_t srcSize)
         | 
| 1643 1645 | 
             
            {
         | 
| 1644 | 
            -
                 | 
| 1646 | 
            +
                ZSTD_FrameHeader zfp = { 0, 0, 0, ZSTD_frame, 0, 0, 0, 0, 0 };
         | 
| 1645 1647 | 
             
                size_t const hError = ZSTD_getFrameHeader(&zfp, src, srcSize);
         | 
| 1646 1648 | 
             
                if (ZSTD_isError(hError)) return 0;
         | 
| 1647 1649 | 
             
                return zfp.dictID;
         | 
| @@ -1999,7 +2001,7 @@ size_t ZSTD_estimateDStreamSize(size_t windowSize) | |
| 1999 2001 | 
             
            size_t ZSTD_estimateDStreamSize_fromFrame(const void* src, size_t srcSize)
         | 
| 2000 2002 | 
             
            {
         | 
| 2001 2003 | 
             
                U32 const windowSizeMax = 1U << ZSTD_WINDOWLOG_MAX;   /* note : should be user-selectable, but requires an additional parameter (or a dctx) */
         | 
| 2002 | 
            -
                 | 
| 2004 | 
            +
                ZSTD_FrameHeader zfh;
         | 
| 2003 2005 | 
             
                size_t const err = ZSTD_getFrameHeader(&zfh, src, srcSize);
         | 
| 2004 2006 | 
             
                if (ZSTD_isError(err)) return err;
         | 
| 2005 2007 | 
             
                RETURN_ERROR_IF(err>0, srcSize_wrong, "");
         | 
| @@ -2094,6 +2096,7 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB | |
| 2094 2096 | 
             
                U32 someMoreWork = 1;
         | 
| 2095 2097 |  | 
| 2096 2098 | 
             
                DEBUGLOG(5, "ZSTD_decompressStream");
         | 
| 2099 | 
            +
                assert(zds != NULL);
         | 
| 2097 2100 | 
             
                RETURN_ERROR_IF(
         | 
| 2098 2101 | 
             
                    input->pos > input->size,
         | 
| 2099 2102 | 
             
                    srcSize_wrong,
         | 
| @@ -139,7 +139,7 @@ static size_t ZSTD_decodeLiteralsBlock(ZSTD_DCtx* dctx, | |
| 139 139 | 
             
                RETURN_ERROR_IF(srcSize < MIN_CBLOCK_SIZE, corruption_detected, "");
         | 
| 140 140 |  | 
| 141 141 | 
             
                {   const BYTE* const istart = (const BYTE*) src;
         | 
| 142 | 
            -
                     | 
| 142 | 
            +
                    SymbolEncodingType_e const litEncType = (SymbolEncodingType_e)(istart[0] & 3);
         | 
| 143 143 | 
             
                    size_t const blockSizeMax = ZSTD_blockSizeMax(dctx);
         | 
| 144 144 |  | 
| 145 145 | 
             
                    switch(litEncType)
         | 
| @@ -358,7 +358,7 @@ size_t ZSTD_decodeLiteralsBlock_wrapper(ZSTD_DCtx* dctx, | |
| 358 358 | 
             
             * - start from default distributions, present in /lib/common/zstd_internal.h
         | 
| 359 359 | 
             
             * - generate tables normally, using ZSTD_buildFSETable()
         | 
| 360 360 | 
             
             * - printout the content of tables
         | 
| 361 | 
            -
             * -  | 
| 361 | 
            +
             * - prettify output, report below, test with fuzzer to ensure it's correct */
         | 
| 362 362 |  | 
| 363 363 | 
             
            /* Default FSE distribution table for Literal Lengths */
         | 
| 364 364 | 
             
            static const ZSTD_seqSymbol LL_defaultDTable[(1<<LL_DEFAULTNORMLOG)+1] = {
         | 
| @@ -645,7 +645,7 @@ void ZSTD_buildFSETable(ZSTD_seqSymbol* dt, | |
| 645 645 | 
             
             * @return : nb bytes read from src,
         | 
| 646 646 | 
             
             *           or an error code if it fails */
         | 
| 647 647 | 
             
            static size_t ZSTD_buildSeqTable(ZSTD_seqSymbol* DTableSpace, const ZSTD_seqSymbol** DTablePtr,
         | 
| 648 | 
            -
                                              | 
| 648 | 
            +
                                             SymbolEncodingType_e type, unsigned max, U32 maxLog,
         | 
| 649 649 | 
             
                                             const void* src, size_t srcSize,
         | 
| 650 650 | 
             
                                             const U32* baseValue, const U8* nbAdditionalBits,
         | 
| 651 651 | 
             
                                             const ZSTD_seqSymbol* defaultTable, U32 flagRepeatTable,
         | 
| @@ -728,9 +728,9 @@ size_t ZSTD_decodeSeqHeaders(ZSTD_DCtx* dctx, int* nbSeqPtr, | |
| 728 728 | 
             
                /* FSE table descriptors */
         | 
| 729 729 | 
             
                RETURN_ERROR_IF(ip+1 > iend, srcSize_wrong, ""); /* minimum possible size: 1 byte for symbol encoding types */
         | 
| 730 730 | 
             
                RETURN_ERROR_IF(*ip & 3, corruption_detected, ""); /* The last field, Reserved, must be all-zeroes. */
         | 
| 731 | 
            -
                {    | 
| 732 | 
            -
                     | 
| 733 | 
            -
                     | 
| 731 | 
            +
                {   SymbolEncodingType_e const LLtype = (SymbolEncodingType_e)(*ip >> 6);
         | 
| 732 | 
            +
                    SymbolEncodingType_e const OFtype = (SymbolEncodingType_e)((*ip >> 4) & 3);
         | 
| 733 | 
            +
                    SymbolEncodingType_e const MLtype = (SymbolEncodingType_e)((*ip >> 2) & 3);
         | 
| 734 734 | 
             
                    ip++;
         | 
| 735 735 |  | 
| 736 736 | 
             
                    /* Build DTables */
         | 
| @@ -1935,12 +1935,6 @@ ZSTD_decompressSequencesLong_bmi2(ZSTD_DCtx* dctx, | |
| 1935 1935 |  | 
| 1936 1936 | 
             
            #endif /* DYNAMIC_BMI2 */
         | 
| 1937 1937 |  | 
| 1938 | 
            -
            typedef size_t (*ZSTD_decompressSequences_t)(
         | 
| 1939 | 
            -
                                        ZSTD_DCtx* dctx,
         | 
| 1940 | 
            -
                                        void* dst, size_t maxDstSize,
         | 
| 1941 | 
            -
                                        const void* seqStart, size_t seqSize, int nbSeq,
         | 
| 1942 | 
            -
                                        const ZSTD_longOffset_e isLongOffset);
         | 
| 1943 | 
            -
             | 
| 1944 1938 | 
             
            #ifndef ZSTD_FORCE_DECOMPRESS_SEQUENCES_LONG
         | 
| 1945 1939 | 
             
            static size_t
         | 
| 1946 1940 | 
             
            ZSTD_decompressSequences(ZSTD_DCtx* dctx, void* dst, size_t maxDstSize,
         | 
| @@ -136,7 +136,7 @@ struct ZSTD_DCtx_s | |
| 136 136 | 
             
                const void* virtualStart;     /* virtual start of previous segment if it was just before current one */
         | 
| 137 137 | 
             
                const void* dictEnd;          /* end of previous segment */
         | 
| 138 138 | 
             
                size_t expected;
         | 
| 139 | 
            -
                 | 
| 139 | 
            +
                ZSTD_FrameHeader fParams;
         | 
| 140 140 | 
             
                U64 processedCSize;
         | 
| 141 141 | 
             
                U64 decodedSize;
         | 
| 142 142 | 
             
                blockType_e bType;            /* used in ZSTD_decompressContinue(), store blockType between block header decoding and block decompression stages */
         | 
| @@ -154,7 +154,7 @@ struct ZSTD_DCtx_s | |
| 154 154 | 
             
                size_t rleSize;
         | 
| 155 155 | 
             
                size_t staticSize;
         | 
| 156 156 | 
             
                int isFrameDecompression;
         | 
| 157 | 
            -
            #if DYNAMIC_BMI2 | 
| 157 | 
            +
            #if DYNAMIC_BMI2
         | 
| 158 158 | 
             
                int bmi2;                     /* == 1 if the CPU supports BMI2 and 0 otherwise. CPU support is determined dynamically once per context lifetime. */
         | 
| 159 159 | 
             
            #endif
         | 
| 160 160 |  | 
| @@ -211,11 +211,11 @@ struct ZSTD_DCtx_s | |
| 211 211 | 
             
            };  /* typedef'd to ZSTD_DCtx within "zstd.h" */
         | 
| 212 212 |  | 
| 213 213 | 
             
            MEM_STATIC int ZSTD_DCtx_get_bmi2(const struct ZSTD_DCtx_s *dctx) {
         | 
| 214 | 
            -
            #if DYNAMIC_BMI2 | 
| 215 | 
            -
             | 
| 214 | 
            +
            #if DYNAMIC_BMI2
         | 
| 215 | 
            +
                return dctx->bmi2;
         | 
| 216 216 | 
             
            #else
         | 
| 217 217 | 
             
                (void)dctx;
         | 
| 218 | 
            -
             | 
| 218 | 
            +
                return 0;
         | 
| 219 219 | 
             
            #endif
         | 
| 220 220 | 
             
            }
         | 
| 221 221 |  | 
| @@ -8,16 +8,16 @@ | |
| 8 8 | 
             
             * You may select, at your option, one of the above-listed licenses.
         | 
| 9 9 | 
             
             */
         | 
| 10 10 |  | 
| 11 | 
            -
            #if defined (__cplusplus)
         | 
| 12 | 
            -
            extern "C" {
         | 
| 13 | 
            -
            #endif
         | 
| 14 | 
            -
             | 
| 15 11 | 
             
            #ifndef ZSTD_ZDICT_H
         | 
| 16 12 | 
             
            #define ZSTD_ZDICT_H
         | 
| 17 13 |  | 
| 14 | 
            +
             | 
| 18 15 | 
             
            /*======  Dependencies  ======*/
         | 
| 19 16 | 
             
            #include <stddef.h>  /* size_t */
         | 
| 20 17 |  | 
| 18 | 
            +
            #if defined (__cplusplus)
         | 
| 19 | 
            +
            extern "C" {
         | 
| 20 | 
            +
            #endif
         | 
| 21 21 |  | 
| 22 22 | 
             
            /* =====   ZDICTLIB_API : control library symbols visibility   ===== */
         | 
| 23 23 | 
             
            #ifndef ZDICTLIB_VISIBLE
         | 
| @@ -248,7 +248,7 @@ typedef struct { | |
| 248 248 | 
             
             * is presumed that the most profitable content is at the end of the dictionary,
         | 
| 249 249 | 
             
             * since that is the cheapest to reference.
         | 
| 250 250 | 
             
             *
         | 
| 251 | 
            -
             * `maxDictSize` must be >= max(dictContentSize,  | 
| 251 | 
            +
             * `maxDictSize` must be >= max(dictContentSize, ZDICT_DICTSIZE_MIN).
         | 
| 252 252 | 
             
             *
         | 
| 253 253 | 
             
             * @return: size of dictionary stored into `dstDictBuffer` (<= `maxDictSize`),
         | 
| 254 254 | 
             
             *          or an error code, which can be tested by ZDICT_isError().
         | 
| @@ -271,11 +271,19 @@ ZDICTLIB_API size_t ZDICT_getDictHeaderSize(const void* dictBuffer, size_t dictS | |
| 271 271 | 
             
            ZDICTLIB_API unsigned ZDICT_isError(size_t errorCode);
         | 
| 272 272 | 
             
            ZDICTLIB_API const char* ZDICT_getErrorName(size_t errorCode);
         | 
| 273 273 |  | 
| 274 | 
            +
            #if defined (__cplusplus)
         | 
| 275 | 
            +
            }
         | 
| 276 | 
            +
            #endif
         | 
| 277 | 
            +
             | 
| 274 278 | 
             
            #endif   /* ZSTD_ZDICT_H */
         | 
| 275 279 |  | 
| 276 280 | 
             
            #if defined(ZDICT_STATIC_LINKING_ONLY) && !defined(ZSTD_ZDICT_H_STATIC)
         | 
| 277 281 | 
             
            #define ZSTD_ZDICT_H_STATIC
         | 
| 278 282 |  | 
| 283 | 
            +
            #if defined (__cplusplus)
         | 
| 284 | 
            +
            extern "C" {
         | 
| 285 | 
            +
            #endif
         | 
| 286 | 
            +
             | 
| 279 287 | 
             
            /* This can be overridden externally to hide static symbols. */
         | 
| 280 288 | 
             
            #ifndef ZDICTLIB_STATIC_API
         | 
| 281 289 | 
             
            #  if defined(ZSTD_DLL_EXPORT) && (ZSTD_DLL_EXPORT==1)
         | 
| @@ -466,9 +474,8 @@ ZDICTLIB_STATIC_API | |
| 466 474 | 
             
            size_t ZDICT_addEntropyTablesFromBuffer(void* dictBuffer, size_t dictContentSize, size_t dictBufferCapacity,
         | 
| 467 475 | 
             
                                              const void* samplesBuffer, const size_t* samplesSizes, unsigned nbSamples);
         | 
| 468 476 |  | 
| 469 | 
            -
             | 
| 470 | 
            -
            #endif   /* ZSTD_ZDICT_H_STATIC */
         | 
| 471 | 
            -
             | 
| 472 477 | 
             
            #if defined (__cplusplus)
         | 
| 473 478 | 
             
            }
         | 
| 474 479 | 
             
            #endif
         | 
| 480 | 
            +
             | 
| 481 | 
            +
            #endif   /* ZSTD_ZDICT_H_STATIC */
         |