• Home
  • Raw
  • Download

Lines Matching +full:build +full:- +full:zstd +full:- +full:dll

5  * This source code is licensed under both the BSD-style license (found in the
8 * You may select, at your option, one of the above-listed licenses.
12 /*- Dependencies -*/
19 low-level memory access routines
20 Copyright (C) 2013-2015, Yann Collet.
22 BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php)
48 - FSEv05 source repository : https://github.com/Cyan4973/FiniteStateEntropy
49 - Public forum : https://groups.google.com/forum/#!forum/lz4c
58 /*-****************************************
65 /*-****************************************
79 /*-**************************************************************
106 /*-**************************************************************
209 zstd - standard compression library
211 Copyright (C) 2014-2016, Yann Collet.
213 BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php)
237 - zstd homepage : https://facebook.github.io/zstd
243 * They should not be used in the context DLL as they may change in the future.
253 /*-*************************************
259 /*-*************************************
262 /*- Advanced Decompression functions -*/
285 A ZSTDv05_DCtx object can be re-used multiple times.
314 /*! Block functions produce and decode raw zstd blocks, without frame metadata.
318 - Uncompressed block size must be <= 128 KB
319 - Compressing or decompressing requires a context structure
321 - It is necessary to init context before starting
326- When a block is considered not compressible enough, ZSTDv05_compressBlock() result will be zero.
345 zstd_internal - common functions to include
347 Copyright (C) 2014-2016, Yann Collet.
349 BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php)
373 - zstd source repository : https://github.com/Cyan4973/zstd
380 /*-*************************************
387 /*-*************************************
421 #define MaxLit ((1<<Litbits) - 1)
422 #define MaxML ((1<<MLbits) - 1)
423 #define MaxLL ((1<<LLbits) - 1)
424 #define MaxOff ((1<<Offbits)- 1)
439 …/*litCSize*/ + 1 /* RLE or RAW */ + MIN_SEQUENCES_SIZE /* nbSeq==0 */) /* for a non-null block */
443 #define ZSTD_CONTENTSIZE_ERROR (0ULL - 2)
448 /*-*******************************************
468 /*-*******************************************
502 Copyright (C) 2013-2015, Yann Collet.
504 BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php)
530 - Source repository : https://github.com/Cyan4973/FiniteStateEntropy
531 - Public forum : https://groups.google.com/forum/#!forum/lz4c
547 /*-****************************************
559 ** Important ** : FSEv05_decompress() doesn't decompress non-compressible nor RLE data !!!
621 Copyright (C) 2013-2016, Yann Collet.
623 BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php)
649 - Source repository : https://github.com/Cyan4973/FiniteStateEntropy
661 * Since link-time-optimization is not available for all compilers,
667 /*-********************************************
690 /*-****************************************
698 /*-**************************************************************
724 /*-********************************************************
740 bitD->start = (const char*)srcBuffer; in BITv05_initDStream()
741 bitD->ptr = (const char*)srcBuffer + srcSize - sizeof(size_t); in BITv05_initDStream()
742 bitD->bitContainer = MEM_readLEST(bitD->ptr); in BITv05_initDStream()
743 contain32 = ((const BYTE*)srcBuffer)[srcSize-1]; in BITv05_initDStream()
745 bitD->bitsConsumed = 8 - BITv05_highbit32(contain32); in BITv05_initDStream()
748 bitD->start = (const char*)srcBuffer; in BITv05_initDStream()
749 bitD->ptr = bitD->start; in BITv05_initDStream()
750 bitD->bitContainer = *(const BYTE*)(bitD->start); in BITv05_initDStream()
753 …case 7: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[6]) << (sizeof(size_t)*8 - 16)… in BITv05_initDStream()
754 …case 6: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[5]) << (sizeof(size_t)*8 - 24)… in BITv05_initDStream()
755 …case 5: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[4]) << (sizeof(size_t)*8 - 32)… in BITv05_initDStream()
756 … case 4: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[3]) << 24; /* fall-through */ in BITv05_initDStream()
757 … case 3: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[2]) << 16; /* fall-through */ in BITv05_initDStream()
758 … case 2: bitD->bitContainer += (size_t)(((const BYTE*)(bitD->start))[1]) << 8; /* fall-through */ in BITv05_initDStream()
761 contain32 = ((const BYTE*)srcBuffer)[srcSize-1]; in BITv05_initDStream()
763 bitD->bitsConsumed = 8 - BITv05_highbit32(contain32); in BITv05_initDStream()
764 bitD->bitsConsumed += (U32)(sizeof(size_t) - srcSize)*8; in BITv05_initDStream()
772 const U32 bitMask = sizeof(bitD->bitContainer)*8 - 1; in BITv05_lookBits()
773 …return ((bitD->bitContainer << (bitD->bitsConsumed & bitMask)) >> 1) >> ((bitMask-nbBits) & bitMas… in BITv05_lookBits()
780 const U32 bitMask = sizeof(bitD->bitContainer)*8 - 1; in BITv05_lookBitsFast()
781 … return (bitD->bitContainer << (bitD->bitsConsumed & bitMask)) >> (((bitMask+1)-nbBits) & bitMask); in BITv05_lookBitsFast()
786 bitD->bitsConsumed += nbBits; in BITv05_skipBits()
807 if (bitD->bitsConsumed > (sizeof(bitD->bitContainer)*8)) /* should never happen */ in BITv05_reloadDStream()
810 if (bitD->ptr >= bitD->start + sizeof(bitD->bitContainer)) { in BITv05_reloadDStream()
811 bitD->ptr -= bitD->bitsConsumed >> 3; in BITv05_reloadDStream()
812 bitD->bitsConsumed &= 7; in BITv05_reloadDStream()
813 bitD->bitContainer = MEM_readLEST(bitD->ptr); in BITv05_reloadDStream()
816 if (bitD->ptr == bitD->start) { in BITv05_reloadDStream()
817 if (bitD->bitsConsumed < sizeof(bitD->bitContainer)*8) return BITv05_DStream_endOfBuffer; in BITv05_reloadDStream()
821 U32 nbBytes = bitD->bitsConsumed >> 3; in BITv05_reloadDStream()
823 if (bitD->ptr - nbBytes < bitD->start) { in BITv05_reloadDStream()
824 nbBytes = (U32)(bitD->ptr - bitD->start); /* ptr > start */ in BITv05_reloadDStream()
827 bitD->ptr -= nbBytes; in BITv05_reloadDStream()
828 bitD->bitsConsumed -= nbBytes*8; in BITv05_reloadDStream()
829 bitD->bitContainer = MEM_readLEST(bitD->ptr); /* reminder : srcSize > sizeof(bitD) */ in BITv05_reloadDStream()
839 …return ((DStream->ptr == DStream->start) && (DStream->bitsConsumed == sizeof(DStream->bitContainer… in BITv05_endOfDStream()
850 Copyright (C) 2013-2015, Yann Collet
852 BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php)
878 - Source repository : https://github.com/Cyan4973/FiniteStateEntropy
879 - Public forum : https://groups.google.com/forum/#!forum/lz4c
901 /* build a fake FSEv05_DTable, designed to read an uncompressed bitstream where each symbol uses nb…
904 /* build a fake FSEv05_DTable, designed to always generate the same symbolValue */
954 DStatePtr->state = BITv05_readBits(bitD, DTableH->tableLog); in FSEv05_initDState()
956 DStatePtr->table = dt + 1; in FSEv05_initDState()
961 const FSEv05_decode_t DInfo = ((const FSEv05_decode_t*)(DStatePtr->table))[DStatePtr->state]; in FSEv05_peakSymbol()
967 const FSEv05_decode_t DInfo = ((const FSEv05_decode_t*)(DStatePtr->table))[DStatePtr->state]; in FSEv05_decodeSymbol()
972 DStatePtr->state = DInfo.newState + lowBits; in FSEv05_decodeSymbol()
978 const FSEv05_decode_t DInfo = ((const FSEv05_decode_t*)(DStatePtr->table))[DStatePtr->state]; in FSEv05_decodeSymbolFast()
983 DStatePtr->state = DInfo.newState + lowBits; in FSEv05_decodeSymbolFast()
989 return DStatePtr->state == 0; in FSEv05_endOfDState()
1000 Copyright (C) 2013-2015, Yann Collet.
1002 BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php)
1028 - FSEv05 source repository : https://github.com/Cyan4973/FiniteStateEntropy
1029 - Public forum : https://groups.google.com/forum/#!forum/lz4c
1038 * Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; et…
1068 # pragma warning(disable : 4214) /* disable: C4214: non-int bitfields */
1094 #define FSEv05_MAX_TABLELOG (FSEv05_MAX_MEMORY_USAGE-2)
1096 #define FSEv05_MAXTABLESIZE_MASK (FSEv05_MAX_TABLESIZE-1)
1097 #define FSEv05_DEFAULT_TABLELOG (FSEv05_DEFAULT_MEMORY_USAGE-2)
1123 for type-specific functions (template emulation in C)
1160 void* const tdPtr = dt+1; /* because dt is unsigned, 32-bits aligned on 32-bits */ in FSEv05_buildDTable()
1163 const U32 tableMask = tableSize-1; in FSEv05_buildDTable()
1167 U32 highThreshold = tableSize-1; in FSEv05_buildDTable()
1168 const S16 largeLimit= (S16)(1 << (tableLog-1)); in FSEv05_buildDTable()
1180 if (normalizedCounter[s]==-1) { in FSEv05_buildDTable()
1181 tableDecode[highThreshold--].symbol = (FSEv05_FUNCTION_TYPE)s; in FSEv05_buildDTable()
1199 /* Build Decoding table */ in FSEv05_buildDTable()
1205 tableDecode[i].nbBits = (BYTE) (tableLog - BITv05_highbit32 ((U32)nextState) ); in FSEv05_buildDTable()
1206 tableDecode[i].newState = (U16) ( (nextState << tableDecode[i].nbBits) - tableSize); in FSEv05_buildDTable()
1216 /*-****************************************
1224 /*-**************************************************************
1225 * FSEv05 NCount encoding-decoding
1227 static short FSEv05_abs(short a) { return a<0 ? -a : a; } in FSEv05_abs()
1260 if (ip < iend-5) { in FSEv05_readNCount()
1276 if ((ip <= iend-7) || (ip + (bitCount>>3) <= iend-4)) { in FSEv05_readNCount()
1285 const short max = (short)((2*threshold-1)-remaining); in FSEv05_readNCount()
1288 if ((bitStream & (threshold-1)) < (U32)max) { in FSEv05_readNCount()
1289 count = (short)(bitStream & (threshold-1)); in FSEv05_readNCount()
1290 bitCount += nbBits-1; in FSEv05_readNCount()
1292 count = (short)(bitStream & (2*threshold-1)); in FSEv05_readNCount()
1293 if (count >= threshold) count -= max; in FSEv05_readNCount()
1297 count--; /* extra accuracy */ in FSEv05_readNCount()
1298 remaining -= FSEv05_abs(count); in FSEv05_readNCount()
1302 nbBits--; in FSEv05_readNCount()
1306 if ((ip <= iend-7) || (ip + (bitCount>>3) <= iend-4)) { in FSEv05_readNCount()
1310 bitCount -= (int)(8 * (iend - 4 - ip)); in FSEv05_readNCount()
1311 ip = iend - 4; in FSEv05_readNCount()
1316 *maxSVPtr = charnum-1; in FSEv05_readNCount()
1319 if ((size_t)(ip-istart) > hbSize) return ERROR(srcSize_wrong); in FSEv05_readNCount()
1320 return ip-istart; in FSEv05_readNCount()
1325 /*-*******************************************************
1335 DTableH->tableLog = 0; in FSEv05_buildDTable_rle()
1336 DTableH->fastMode = 0; in FSEv05_buildDTable_rle()
1338 cell->newState = 0; in FSEv05_buildDTable_rle()
1339 cell->symbol = symbolValue; in FSEv05_buildDTable_rle()
1340 cell->nbBits = 0; in FSEv05_buildDTable_rle()
1353 const unsigned tableMask = tableSize - 1; in FSEv05_buildDTable_raw()
1360 /* Build Decoding Table */ in FSEv05_buildDTable_raw()
1361 DTableH->tableLog = (U16)nbBits; in FSEv05_buildDTable_raw()
1362 DTableH->fastMode = 1; in FSEv05_buildDTable_raw()
1380 BYTE* const olimit = omax-3; in FSEv05_decompress_usingDTable_generic()
1432 return op-ostart; in FSEv05_decompress_usingDTable_generic()
1446 const U32 fastMode = DTableH->fastMode; in FSEv05_decompress_usingDTable()
1471 cSrcSize -= errorCode; in FSEv05_decompress()
1486 Copyright (C) 2013-2016, Yann Collet.
1488 BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php)
1514 - Source repository : https://github.com/Cyan4973/FiniteStateEntropy
1559 Copyright (C) 2013-2016, Yann Collet
1561 BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php)
1587 - Source repository : https://github.com/Cyan4973/FiniteStateEntropy
1614 …ss4X2 (void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize); /* single-symbol decoder */
1615 …s4X4 (void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize); /* double-symbols decoder */
1623 1. select the decompression algorithm (X2, X4, X6) based on pre-computed heuristics
1624 2. build Huffman table from save, using HUFv05_readDTableXn()
1636 …ss1X2 (void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize); /* single-symbol decoder */
1637 …ss1X4 (void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize); /* double-symbol decoder */
1651 Copyright (C) 2013-2015, Yann Collet.
1653 BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php)
1679 - FSEv05+Huff0 source repository : https://github.com/Cyan4973/FiniteStateEntropy
1680 - Public forum : https://groups.google.com/forum/#!forum/lz4c
1731 typedef struct { BYTE byte; BYTE nbBits; } HUFv05_DEltX2; /* single-symbol decoding */
1733 typedef struct { U16 sequence; BYTE nbBits; BYTE length; } HUFv05_DEltX4; /* double-symbols decodi…
1760 oSize = l[iSize-242]; in HUFv05_readStats()
1765 oSize = iSize - 127; in HUFv05_readStats()
1776 …oSize = FSEv05_decompress(huffWeight, hwSize-1, ip+1, iSize); /* max (hwSize-1) values decoded, … in HUFv05_readStats()
1790 /* get last non-null symbol weight (implied, total must be 2^n) */ in HUFv05_readStats()
1795 U32 rest = total - weightTotal; in HUFv05_readStats()
1813 /*-***************************/
1814 /* single-symbol decoding */
1815 /*-***************************/
1837 … /* maybe should separate sizeof allocated DTable, from used size of DTable, in case of re-use */ in HUFv05_readDTableX2()
1843 nextRankStart += (rankVal[n] << (n-1)); in HUFv05_readDTableX2()
1853 D.byte = (BYTE)n; D.nbBits = (BYTE)(tableLog + 1 - w); in HUFv05_readDTableX2()
1886 while ((BITv05_reloadDStream(bitDPtr) == BITv05_DStream_unfinished) && (p <= pEnd-4)) { in HUFv05_decodeStreamX2()
1901 return pEnd-pStart; in HUFv05_decodeStreamX2()
1938 cSrcSize -= errorCode; in HUFv05_decompress1X2()
1983 length4 = cSrcSize - (length1 + length2 + length3 + 6); in HUFv05_decompress4X2_usingDTable()
1994 /* 16-32 symbols per loop (4-8 symbols per stream) */ in HUFv05_decompress4X2_usingDTable()
1996 for ( ; (endSignal==BITv05_DStream_unfinished) && (op4<(oend-7)) ; ) { in HUFv05_decompress4X2_usingDTable()
2048 cSrcSize -= errorCode; in HUFv05_decompress4X2()
2055 /* double-symbols decoding */
2067 /* get pre-calculated rankVal */ in HUFv05_fillDTableX4Level2()
2084 const U32 nbBits = nbBitsBaseline - weight; in HUFv05_fillDTableX4Level2()
2085 const U32 length = 1 << (sizeLog-nbBits); in HUFv05_fillDTableX4Level2()
2107 …const int scaleLog = nbBitsBaseline - targetLog; /* note : targetLog >= srcLog, hence scaleLog <… in HUFv05_fillDTableX4()
2108 const U32 minBits = nbBitsBaseline - maxWeight; in HUFv05_fillDTableX4()
2117 const U32 nbBits = nbBitsBaseline - weight; in HUFv05_fillDTableX4()
2119 const U32 length = 1 << (targetLog-nbBits); in HUFv05_fillDTableX4()
2121 if (targetLog-nbBits >= minBits) { /* enough room for a second symbol */ in HUFv05_fillDTableX4()
2126 HUFv05_fillDTableX4Level2(DTable+start, targetLog-nbBits, nbBits, in HUFv05_fillDTableX4()
2128 sortedList+sortedRank, sortedListSize-sortedRank, in HUFv05_fillDTableX4()
2170 … for (maxW = tableLog; rankStats[maxW]==0; maxW--) {} /* necessarily finds a solution before 0 */ in HUFv05_readDTableX4()
2196 /* Build rankVal */ in HUFv05_readDTableX4()
2198 const U32 minBits = tableLog+1 - maxW; in HUFv05_readDTableX4()
2201 const int rescale = (memLog-tableLog) - 1; /* tableLog <= memLog */ in HUFv05_readDTableX4()
2208 for (consumed = minBits; consumed <= memLog - minBits; consumed++) { in HUFv05_readDTableX4()
2237 if (DStream->bitsConsumed < (sizeof(DStream->bitContainer)*8)) { in HUFv05_decodeLastSymbolX4()
2239 if (DStream->bitsConsumed > (sizeof(DStream->bitContainer)*8)) in HUFv05_decodeLastSymbolX4()
2240 …DStream->bitsConsumed = (sizeof(DStream->bitContainer)*8); /* ugly hack; works only because it's… in HUFv05_decodeLastSymbolX4()
2262 while ((BITv05_reloadDStream(bitDPtr) == BITv05_DStream_unfinished) && (p < pEnd-7)) { in HUFv05_decodeStreamX4()
2270 while ((BITv05_reloadDStream(bitDPtr) == BITv05_DStream_unfinished) && (p <= pEnd-2)) in HUFv05_decodeStreamX4()
2273 while (p <= pEnd-2) in HUFv05_decodeStreamX4()
2279 return p-pStart; in HUFv05_decodeStreamX4()
2321 cSrcSize -= hSize; in HUFv05_decompress1X4()
2365 length4 = cSrcSize - (length1 + length2 + length3 + 6); in HUFv05_decompress4X4_usingDTable()
2376 /* 16-32 symbols per loop (4-8 symbols per stream) */ in HUFv05_decompress4X4_usingDTable()
2378 for ( ; (endSignal==BITv05_DStream_unfinished) && (op4<(oend-7)) ; ) { in HUFv05_decompress4X4_usingDTable()
2430 cSrcSize -= hSize; in HUFv05_decompress4X4()
2446 {{ 38,130}, {1313, 74}, {2151, 38}}, /* Q == 2 : 12-18% */
2447 {{ 448,128}, {1353, 74}, {2238, 41}}, /* Q == 3 : 18-25% */
2448 {{ 556,128}, {1353, 74}, {2238, 47}}, /* Q == 4 : 25-32% */
2449 {{ 714,128}, {1418, 74}, {2436, 53}}, /* Q == 5 : 32-38% */
2450 {{ 883,128}, {1437, 74}, {2464, 61}}, /* Q == 6 : 38-44% */
2451 {{ 897,128}, {1515, 75}, {2622, 68}}, /* Q == 7 : 44-50% */
2452 {{ 926,128}, {1613, 75}, {2730, 75}}, /* Q == 8 : 50-56% */
2453 {{ 947,128}, {1729, 77}, {3359, 77}}, /* Q == 9 : 56-62% */
2454 {{1107,128}, {2083, 81}, {4006, 84}}, /* Q ==10 : 62-69% */
2455 {{1177,128}, {2379, 87}, {4785, 88}}, /* Q ==11 : 69-75% */
2456 {{1242,128}, {2415, 93}, {5155, 84}}, /* Q ==12 : 75-81% */
2457 {{1349,128}, {2644,106}, {5260,106}}, /* Q ==13 : 81-87% */
2458 {{1455,128}, {2422,124}, {4174,124}}, /* Q ==14 : 87-93% */
2459 {{ 722,128}, {1891,145}, {1936,146}}, /* Q ==15 : 93-99% */
2490 …/* return HUFv05_decompress4X2(dst, dstSize, cSrc, cSrcSize); */ /* multi-streams single-symbol … in HUFv05_decompress()
2491 …/* return HUFv05_decompress4X4(dst, dstSize, cSrc, cSrcSize); */ /* multi-streams double-symbols… in HUFv05_decompress()
2492 …/* return HUFv05_decompress4X6(dst, dstSize, cSrc, cSrcSize); */ /* multi-streams quad-symbols d… in HUFv05_decompress()
2495 zstd - standard compression library
2496 Copyright (C) 2014-2016, Yann Collet.
2498 BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php)
2522 - zstd source repository : https://github.com/Cyan4973/zstd
2538 /*-*******************************************************
2546 /*-*******************************************************
2556 /*-*************************************
2618 dctx->expected = ZSTDv05_frameHeaderSize_min; in ZSTDv05_decompressBegin()
2619 dctx->stage = ZSTDv05ds_getFrameHeaderSize; in ZSTDv05_decompressBegin()
2620 dctx->previousDstEnd = NULL; in ZSTDv05_decompressBegin()
2621 dctx->base = NULL; in ZSTDv05_decompressBegin()
2622 dctx->vBase = NULL; in ZSTDv05_decompressBegin()
2623 dctx->dictEnd = NULL; in ZSTDv05_decompressBegin()
2624 dctx->hufTableX4[0] = ZSTD_HUFFDTABLE_CAPACITY_LOG; in ZSTDv05_decompressBegin()
2625 dctx->flagStaticTables = 0; in ZSTDv05_decompressBegin()
2646 …sizeof(ZSTDv05_DCtx) - (BLOCKSIZE+WILDCOPY_OVERLENGTH + ZSTDv05_frameHeaderSize_max)); /* no need… in ZSTDv05_copyDCtx()
2655 Frame Header - [ Block Header - Block ] - Frame End
2657 - 4 bytes - Magic Number : ZSTDv05_MAGICNUMBER (defined within zstd_internal.h)
2658 - 1 byte - Window Descriptor
2660 - 3 bytes, starting with a 2-bits descriptor
2665 - 3 bytes, compatible with Block Header
2670 Block = Literal Section - Sequences Section
2675 1.1) Header : 1-5 bytes
2684 1.1.1) Huff0-compressed literal block : 3-5 bytes
2685 srcSize < 1 KB => 3 bytes (2-2-10-10) => single stream
2686 srcSize < 1 KB => 3 bytes (2-2-10-10)
2687 srcSize < 16KB => 4 bytes (2-2-14-14)
2688 else => 5 bytes (2-2-18-18)
2691 1.1.2) Raw (uncompressed) literal block header : 1-3 bytes
2699 1.1.3) Rle (repeated single byte) literal block header : 1-3 bytes
2707 1.1.4) Huff0-compressed literal block, using precomputed CTables : 3-5 bytes
2708 srcSize < 1 KB => 3 bytes (2-2-10-10) => single stream
2709 srcSize < 1 KB => 3 bytes (2-2-10-10)
2710 srcSize < 16KB => 4 bytes (2-2-14-14)
2711 else => 5 bytes (2-2-18-18)
2714 1- CTable available (stored into workspace ?)
2715 2- Small input (fast heuristic ? Full comparison ? depend on clevel ?)
2746 zc->headerSize = ZSTDv05_frameHeaderSize_min; in ZSTDv05_decodeFrameHeader_Part1()
2747 return zc->headerSize; in ZSTDv05_decodeFrameHeader_Part1()
2758 params->windowLog = (((const BYTE*)src)[4] & 15) + ZSTDv05_WINDOWLOG_ABSOLUTEMIN; in ZSTDv05_getFrameParams()
2770 if (srcSize != zc->headerSize) in ZSTDv05_decodeFrameHeader_Part2()
2772 result = ZSTDv05_getFrameParams(&(zc->params), src, srcSize); in ZSTDv05_decodeFrameHeader_Part2()
2773 if ((MEM_32bits()) && (zc->params.windowLog > 25)) return ERROR(frameParameter_unsupported); in ZSTDv05_decodeFrameHeader_Part2()
2790 bpPtr->blockType = (blockType_t)(headerFlags >> 6); in ZSTDv05_getcBlockSize()
2791 bpPtr->origSize = (bpPtr->blockType == bt_rle) ? cSize : 0; in ZSTDv05_getcBlockSize()
2793 if (bpPtr->blockType == bt_end) return 0; in ZSTDv05_getcBlockSize()
2794 if (bpPtr->blockType == bt_rle) return 1; in ZSTDv05_getcBlockSize()
2828 /* 2 - 2 - 10 - 10 */ in ZSTDv05_decodeLiteralsBlock()
2835 /* 2 - 2 - 14 - 14 */ in ZSTDv05_decodeLiteralsBlock()
2841 /* 2 - 2 - 18 - 18 */ in ZSTDv05_decodeLiteralsBlock()
2851 … HUFv05_decompress1X2(dctx->litBuffer, litSize, istart+lhSize, litCSize) : in ZSTDv05_decodeLiteralsBlock()
2852 … HUFv05_decompress (dctx->litBuffer, litSize, istart+lhSize, litCSize) )) in ZSTDv05_decodeLiteralsBlock()
2855 dctx->litPtr = dctx->litBuffer; in ZSTDv05_decodeLiteralsBlock()
2856 dctx->litSize = litSize; in ZSTDv05_decodeLiteralsBlock()
2857 memset(dctx->litBuffer + dctx->litSize, 0, WILDCOPY_OVERLENGTH); in ZSTDv05_decodeLiteralsBlock()
2867 if (!dctx->flagStaticTables) in ZSTDv05_decodeLiteralsBlock()
2870 /* 2 - 2 - 10 - 10 */ in ZSTDv05_decodeLiteralsBlock()
2876 …errorCode = HUFv05_decompress1X4_usingDTable(dctx->litBuffer, litSize, istart+lhSize, litCSize, dc… in ZSTDv05_decodeLiteralsBlock()
2879 dctx->litPtr = dctx->litBuffer; in ZSTDv05_decodeLiteralsBlock()
2880 dctx->litSize = litSize; in ZSTDv05_decodeLiteralsBlock()
2881 memset(dctx->litBuffer + dctx->litSize, 0, WILDCOPY_OVERLENGTH); in ZSTDv05_decodeLiteralsBlock()
2904 memcpy(dctx->litBuffer, istart+lhSize, litSize); in ZSTDv05_decodeLiteralsBlock()
2905 dctx->litPtr = dctx->litBuffer; in ZSTDv05_decodeLiteralsBlock()
2906 dctx->litSize = litSize; in ZSTDv05_decodeLiteralsBlock()
2907 memset(dctx->litBuffer + dctx->litSize, 0, WILDCOPY_OVERLENGTH); in ZSTDv05_decodeLiteralsBlock()
2911 dctx->litPtr = istart+lhSize; in ZSTDv05_decodeLiteralsBlock()
2912 dctx->litSize = litSize; in ZSTDv05_decodeLiteralsBlock()
2934 memset(dctx->litBuffer, istart[lhSize], litSize + WILDCOPY_OVERLENGTH); in ZSTDv05_decodeLiteralsBlock()
2935 dctx->litPtr = dctx->litBuffer; in ZSTDv05_decodeLiteralsBlock()
2936 dctx->litSize = litSize; in ZSTDv05_decodeLiteralsBlock()
2965 *nbSeq = ((nbSeq[0]-128)<<8) + *ip++; in ZSTDv05_decodeSeqHeaders()
2988 …if (ip > iend-3) return ERROR(srcSize_wrong); /* min : all 3 are "raw", hence no header, but at le… in ZSTDv05_decodeSeqHeaders()
2995 /* Build DTables */ in ZSTDv05_decodeSeqHeaders()
3012 headerSize = FSEv05_readNCount(norm, &max, &LLlog, ip, iend-ip); in ZSTDv05_decodeSeqHeaders()
3023 …if (ip > iend-2) return ERROR(srcSize_wrong); /* min : "raw", hence no header, but at least xxLo… in ZSTDv05_decodeSeqHeaders()
3036 headerSize = FSEv05_readNCount(norm, &max, &Offlog, ip, iend-ip); in ZSTDv05_decodeSeqHeaders()
3047 …if (ip > iend-2) return ERROR(srcSize_wrong); /* min : "raw", hence no header, but at least xxLog … in ZSTDv05_decodeSeqHeaders()
3060 headerSize = FSEv05_readNCount(norm, &max, &MLlog, ip, iend-ip); in ZSTDv05_decodeSeqHeaders()
3067 return ip-istart; in ZSTDv05_decodeSeqHeaders()
3095 const BYTE* dumps = seqState->dumps; in ZSTDv05_decodeSequence()
3096 const BYTE* const de = seqState->dumpsEnd; in ZSTDv05_decodeSequence()
3099 litLength = FSEv05_peakSymbol(&(seqState->stateLL)); in ZSTDv05_decodeSequence()
3100 prevOffset = litLength ? seq->offset : seqState->prevOffset; in ZSTDv05_decodeSequence()
3113 …if (dumps >= de) { dumps = de-1; } /* late correction, to avoid read overflow (data is now corrup… in ZSTDv05_decodeSequence()
3122 …U32 offsetCode = FSEv05_peakSymbol(&(seqState->stateOffb)); /* <= maxOff, by table construction … in ZSTDv05_decodeSequence()
3123 U32 nbBits = offsetCode - 1; in ZSTDv05_decodeSequence()
3125 offset = offsetPrefix[offsetCode] + BITv05_readBits(&(seqState->DStream), nbBits); in ZSTDv05_decodeSequence()
3126 if (MEM_32bits()) BITv05_reloadDStream(&(seqState->DStream)); in ZSTDv05_decodeSequence()
3128 if (offsetCode | !litLength) seqState->prevOffset = seq->offset; /* cmove */ in ZSTDv05_decodeSequence()
3129 FSEv05_decodeSymbol(&(seqState->stateOffb), &(seqState->DStream)); /* update */ in ZSTDv05_decodeSequence()
3133 FSEv05_decodeSymbol(&(seqState->stateLL), &(seqState->DStream)); /* update */ in ZSTDv05_decodeSequence()
3134 if (MEM_32bits()) BITv05_reloadDStream(&(seqState->DStream)); in ZSTDv05_decodeSequence()
3137 matchLength = FSEv05_decodeSymbol(&(seqState->stateML), &(seqState->DStream)); in ZSTDv05_decodeSequence()
3150 …if (dumps >= de) { dumps = de-1; } /* late correction, to avoid read overflow (data is now corrup… in ZSTDv05_decodeSequence()
3155 seq->litLength = litLength; in ZSTDv05_decodeSequence()
3156 seq->offset = offset; in ZSTDv05_decodeSequence()
3157 seq->matchLength = matchLength; in ZSTDv05_decodeSequence()
3158 seqState->dumps = dumps; in ZSTDv05_decodeSequence()
3180 BYTE* const oMatchEnd = op + sequenceLength; /* risk : address space overflow (32-bits) */ in ZSTDv05_execSequence()
3181 BYTE* const oend_8 = oend-8; in ZSTDv05_execSequence()
3183 const BYTE* match = oLitEnd - sequence.offset; in ZSTDv05_execSequence()
3188 if (seqLength > (size_t)(oend - op)) return ERROR(dstSize_tooSmall); in ZSTDv05_execSequence()
3189 if (sequence.litLength > (size_t)(litLimit - *litPtr)) return ERROR(corruption_detected); in ZSTDv05_execSequence()
3197 …ZSTDv05_wildcopy(op, *litPtr, (ptrdiff_t)sequence.litLength); /* note : oLitEnd <= oend-8 : no r… in ZSTDv05_execSequence()
3202 if (sequence.offset > (size_t)(oLitEnd - base)) { in ZSTDv05_execSequence()
3204 if (sequence.offset > (size_t)(oLitEnd - vBase)) in ZSTDv05_execSequence()
3206 match = dictEnd - (base-match); in ZSTDv05_execSequence()
3213 size_t length1 = dictEnd - match; in ZSTDv05_execSequence()
3216 sequence.matchLength -= length1; in ZSTDv05_execSequence()
3235 match -= sub2; in ZSTDv05_execSequence()
3241 if (oMatchEnd > oend-(16-MINMATCH)) { in ZSTDv05_execSequence()
3243 ZSTDv05_wildcopy(op, match, oend_8 - op); in ZSTDv05_execSequence()
3244 match += oend_8 - op; in ZSTDv05_execSequence()
3250 …ZSTDv05_wildcopy(op, match, (ptrdiff_t)sequence.matchLength-8); /* works even if matchLength < 8… in ZSTDv05_execSequence()
3267 const BYTE* litPtr = dctx->litPtr; in ZSTDv05_decompressSequences()
3268 const BYTE* const litEnd = litPtr + dctx->litSize; in ZSTDv05_decompressSequences()
3271 unsigned* DTableLL = dctx->LLTable; in ZSTDv05_decompressSequences()
3272 unsigned* DTableML = dctx->MLTable; in ZSTDv05_decompressSequences()
3273 unsigned* DTableOffb = dctx->OffTable; in ZSTDv05_decompressSequences()
3274 const BYTE* const base = (const BYTE*) (dctx->base); in ZSTDv05_decompressSequences()
3275 const BYTE* const vBase = (const BYTE*) (dctx->vBase); in ZSTDv05_decompressSequences()
3276 const BYTE* const dictEnd = (const BYTE*) (dctx->dictEnd); in ZSTDv05_decompressSequences()
3278 /* Build Decoding Tables */ in ZSTDv05_decompressSequences()
3281 ip, seqSize, dctx->flagStaticTables); in ZSTDv05_decompressSequences()
3295 errorCode = BITv05_initDStream(&(seqState.DStream), ip, iend-ip); in ZSTDv05_decompressSequences()
3303 nbSeq--; in ZSTDv05_decompressSequences()
3316 size_t lastLLSize = litEnd - litPtr; in ZSTDv05_decompressSequences()
3325 return op-ostart; in ZSTDv05_decompressSequences()
3331 if (dst != dctx->previousDstEnd) { /* not contiguous */ in ZSTDv05_checkContinuity()
3332 dctx->dictEnd = dctx->previousDstEnd; in ZSTDv05_checkContinuity()
3333 …dctx->vBase = (const char*)dst - ((const char*)(dctx->previousDstEnd) - (const char*)(dctx->base)); in ZSTDv05_checkContinuity()
3334 dctx->base = dst; in ZSTDv05_checkContinuity()
3335 dctx->previousDstEnd = dst; in ZSTDv05_checkContinuity()
3349 /* Decode literals sub-block */ in ZSTDv05_decompressBlock_internal()
3353 srcSize -= litCSize; in ZSTDv05_decompressBlock_internal()
3389 ip += frameHeaderSize; remainingSize -= frameHeaderSize; in ZSTDv05_decompress_continueDCtx()
3398 size_t cBlockSize = ZSTDv05_getcBlockSize(ip, iend-ip, &blockProperties); in ZSTDv05_decompress_continueDCtx()
3402 remainingSize -= ZSTDv05_blockHeaderSize; in ZSTDv05_decompress_continueDCtx()
3408 decodedSize = ZSTDv05_decompressBlock_internal(dctx, op, oend-op, ip, cBlockSize); in ZSTDv05_decompress_continueDCtx()
3411 decodedSize = ZSTDv05_copyRawBlock(op, oend-op, ip, cBlockSize); in ZSTDv05_decompress_continueDCtx()
3428 remainingSize -= cBlockSize; in ZSTDv05_decompress_continueDCtx()
3431 return op-ostart; in ZSTDv05_decompress_continueDCtx()
3500 ip += ZSTDv05_frameHeaderSize_min; remainingSize -= ZSTDv05_frameHeaderSize_min; in ZSTDv05_findFrameSizeInfoLegacy()
3512 remainingSize -= ZSTDv05_blockHeaderSize; in ZSTDv05_findFrameSizeInfoLegacy()
3521 remainingSize -= cBlockSize; in ZSTDv05_findFrameSizeInfoLegacy()
3525 *cSize = ip - (const BYTE*)src; in ZSTDv05_findFrameSizeInfoLegacy()
3534 return dctx->expected; in ZSTDv05_nextSrcSizeToDecompress()
3540 if (srcSize != dctx->expected) return ERROR(srcSize_wrong); in ZSTDv05_decompressContinue()
3544 switch (dctx->stage) in ZSTDv05_decompressContinue()
3549 dctx->headerSize = ZSTDv05_decodeFrameHeader_Part1(dctx, src, ZSTDv05_frameHeaderSize_min); in ZSTDv05_decompressContinue()
3550 if (ZSTDv05_isError(dctx->headerSize)) return dctx->headerSize; in ZSTDv05_decompressContinue()
3551 memcpy(dctx->headerBuffer, src, ZSTDv05_frameHeaderSize_min); in ZSTDv05_decompressContinue()
3552 …if (dctx->headerSize > ZSTDv05_frameHeaderSize_min) return ERROR(GENERIC); /* should never happen … in ZSTDv05_decompressContinue()
3553 dctx->expected = 0; /* not necessary to copy more */ in ZSTDv05_decompressContinue()
3557 …{ size_t const result = ZSTDv05_decodeFrameHeader_Part2(dctx, dctx->headerBuffer, dctx->headerSi… in ZSTDv05_decompressContinue()
3559 dctx->expected = ZSTDv05_blockHeaderSize; in ZSTDv05_decompressContinue()
3560 dctx->stage = ZSTDv05ds_decodeBlockHeader; in ZSTDv05_decompressContinue()
3570 dctx->expected = 0; in ZSTDv05_decompressContinue()
3571 dctx->stage = ZSTDv05ds_getFrameHeaderSize; in ZSTDv05_decompressContinue()
3574 dctx->expected = blockSize; in ZSTDv05_decompressContinue()
3575 dctx->bType = bp.blockType; in ZSTDv05_decompressContinue()
3576 dctx->stage = ZSTDv05ds_decompressBlock; in ZSTDv05_decompressContinue()
3584 switch(dctx->bType) in ZSTDv05_decompressContinue()
3601 dctx->stage = ZSTDv05ds_decodeBlockHeader; in ZSTDv05_decompressContinue()
3602 dctx->expected = ZSTDv05_blockHeaderSize; in ZSTDv05_decompressContinue()
3604 dctx->previousDstEnd = (char*)dst + rSize; in ZSTDv05_decompressContinue()
3615 dctx->dictEnd = dctx->previousDstEnd; in ZSTDv05_refDictContent()
3616 …dctx->vBase = (const char*)dict - ((const char*)(dctx->previousDstEnd) - (const char*)(dctx->base)… in ZSTDv05_refDictContent()
3617 dctx->base = dict; in ZSTDv05_refDictContent()
3618 dctx->previousDstEnd = (const char*)dict + dictSize; in ZSTDv05_refDictContent()
3631 hSize = HUFv05_readDTableX4(dctx->hufTableX4, dict, dictSize); in ZSTDv05_loadEntropy()
3634 dictSize -= hSize; in ZSTDv05_loadEntropy()
3639 errorCode = FSEv05_buildDTable(dctx->OffTable, offcodeNCount, offcodeMaxValue, offcodeLog); in ZSTDv05_loadEntropy()
3642 dictSize -= offcodeHeaderSize; in ZSTDv05_loadEntropy()
3647 …errorCode = FSEv05_buildDTable(dctx->MLTable, matchlengthNCount, matchlengthMaxValue, matchlengthL… in ZSTDv05_loadEntropy()
3650 dictSize -= matchlengthHeaderSize; in ZSTDv05_loadEntropy()
3655 errorCode = FSEv05_buildDTable(dctx->LLTable, litlengthNCount, litlengthMaxValue, litlengthLog); in ZSTDv05_loadEntropy()
3658 dctx->flagStaticTables = 1; in ZSTDv05_loadEntropy()
3673 dictSize -= 4; in ZSTDv05_decompress_insertDictionary()
3679 dictSize -= eSize; in ZSTDv05_decompress_insertDictionary()
3701 Buffered version of Zstd compression library
3702 Copyright (C) 2015-2016, Yann Collet.
3704 BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php)
3728 - zstd source repository : https://github.com/Cyan4973/zstd
3729 - ztsd public forum : https://groups.google.com/forum/#!forum/lz4c
3809 zbc->zc = ZSTDv05_createDCtx(); in ZBUFFv05_createDCtx()
3810 zbc->stage = ZBUFFv05ds_init; in ZBUFFv05_createDCtx()
3817 ZSTDv05_freeDCtx(zbc->zc); in ZBUFFv05_freeDCtx()
3818 free(zbc->inBuff); in ZBUFFv05_freeDCtx()
3819 free(zbc->outBuff); in ZBUFFv05_freeDCtx()
3829 zbc->stage = ZBUFFv05ds_readHeader; in ZBUFFv05_decompressInitDictionary()
3830 zbc->hPos = zbc->inPos = zbc->outStart = zbc->outEnd = 0; in ZBUFFv05_decompressInitDictionary()
3831 return ZSTDv05_decompressBegin_usingDict(zbc->zc, dict, dictSize); in ZBUFFv05_decompressInitDictionary()
3853 switch(zbc->stage) in ZBUFFv05_decompressContinue()
3861 size_t headerSize = ZSTDv05_getFrameParams(&(zbc->params), src, *srcSizePtr); in ZBUFFv05_decompressContinue()
3865 memcpy(zbc->headerBuffer+zbc->hPos, src, *srcSizePtr); in ZBUFFv05_decompressContinue()
3866 zbc->hPos += *srcSizePtr; in ZBUFFv05_decompressContinue()
3868 zbc->stage = ZBUFFv05ds_loadHeader; in ZBUFFv05_decompressContinue()
3869 return headerSize - zbc->hPos; in ZBUFFv05_decompressContinue()
3871 zbc->stage = ZBUFFv05ds_decodeHeader; in ZBUFFv05_decompressContinue()
3874 /* fall-through */ in ZBUFFv05_decompressContinue()
3879 zbc->headerBuffer + zbc->hPos, ZSTDv05_frameHeaderSize_max - zbc->hPos, in ZBUFFv05_decompressContinue()
3881 zbc->hPos += headerSize; in ZBUFFv05_decompressContinue()
3883 headerSize = ZSTDv05_getFrameParams(&(zbc->params), zbc->headerBuffer, zbc->hPos); in ZBUFFv05_decompressContinue()
3888 return headerSize - zbc->hPos; in ZBUFFv05_decompressContinue()
3890 /* zbc->stage = ZBUFFv05ds_decodeHeader; break; */ /* useless : stage follows */ in ZBUFFv05_decompressContinue()
3892 /* fall-through */ in ZBUFFv05_decompressContinue()
3896 size_t neededOutSize = (size_t)1 << zbc->params.windowLog; in ZBUFFv05_decompressContinue()
3898 if (zbc->inBuffSize < neededInSize) { in ZBUFFv05_decompressContinue()
3899 free(zbc->inBuff); in ZBUFFv05_decompressContinue()
3900 zbc->inBuffSize = neededInSize; in ZBUFFv05_decompressContinue()
3901 zbc->inBuff = (char*)malloc(neededInSize); in ZBUFFv05_decompressContinue()
3902 if (zbc->inBuff == NULL) return ERROR(memory_allocation); in ZBUFFv05_decompressContinue()
3904 if (zbc->outBuffSize < neededOutSize) { in ZBUFFv05_decompressContinue()
3905 free(zbc->outBuff); in ZBUFFv05_decompressContinue()
3906 zbc->outBuffSize = neededOutSize; in ZBUFFv05_decompressContinue()
3907 zbc->outBuff = (char*)malloc(neededOutSize); in ZBUFFv05_decompressContinue()
3908 if (zbc->outBuff == NULL) return ERROR(memory_allocation); in ZBUFFv05_decompressContinue()
3910 if (zbc->hPos) { in ZBUFFv05_decompressContinue()
3912 memcpy(zbc->inBuff, zbc->headerBuffer, zbc->hPos); in ZBUFFv05_decompressContinue()
3913 zbc->inPos = zbc->hPos; in ZBUFFv05_decompressContinue()
3914 zbc->hPos = 0; in ZBUFFv05_decompressContinue()
3915 zbc->stage = ZBUFFv05ds_load; in ZBUFFv05_decompressContinue()
3918 zbc->stage = ZBUFFv05ds_read; in ZBUFFv05_decompressContinue()
3919 /* fall-through */ in ZBUFFv05_decompressContinue()
3922 size_t neededInSize = ZSTDv05_nextSrcSizeToDecompress(zbc->zc); in ZBUFFv05_decompressContinue()
3924 zbc->stage = ZBUFFv05ds_init; in ZBUFFv05_decompressContinue()
3928 if ((size_t)(iend-ip) >= neededInSize) { in ZBUFFv05_decompressContinue()
3930 size_t decodedSize = ZSTDv05_decompressContinue(zbc->zc, in ZBUFFv05_decompressContinue()
3931 zbc->outBuff + zbc->outStart, zbc->outBuffSize - zbc->outStart, in ZBUFFv05_decompressContinue()
3936 zbc->outEnd = zbc->outStart + decodedSize; in ZBUFFv05_decompressContinue()
3937 zbc->stage = ZBUFFv05ds_flush; in ZBUFFv05_decompressContinue()
3941 zbc->stage = ZBUFFv05ds_load; in ZBUFFv05_decompressContinue()
3943 /* fall-through */ in ZBUFFv05_decompressContinue()
3946 size_t neededInSize = ZSTDv05_nextSrcSizeToDecompress(zbc->zc); in ZBUFFv05_decompressContinue()
3947 …size_t toLoad = neededInSize - zbc->inPos; /* should always be <= remaining space within inBuff … in ZBUFFv05_decompressContinue()
3949 …if (toLoad > zbc->inBuffSize - zbc->inPos) return ERROR(corruption_detected); /* should never ha… in ZBUFFv05_decompressContinue()
3950 loadedSize = ZBUFFv05_limitCopy(zbc->inBuff + zbc->inPos, toLoad, ip, iend-ip); in ZBUFFv05_decompressContinue()
3952 zbc->inPos += loadedSize; in ZBUFFv05_decompressContinue()
3955 size_t decodedSize = ZSTDv05_decompressContinue(zbc->zc, in ZBUFFv05_decompressContinue()
3956 zbc->outBuff + zbc->outStart, zbc->outBuffSize - zbc->outStart, in ZBUFFv05_decompressContinue()
3957 zbc->inBuff, neededInSize); in ZBUFFv05_decompressContinue()
3959 zbc->inPos = 0; /* input is consumed */ in ZBUFFv05_decompressContinue()
3960 … if (!decodedSize) { zbc->stage = ZBUFFv05ds_read; break; } /* this was just a header */ in ZBUFFv05_decompressContinue()
3961 zbc->outEnd = zbc->outStart + decodedSize; in ZBUFFv05_decompressContinue()
3962 zbc->stage = ZBUFFv05ds_flush; in ZBUFFv05_decompressContinue()
3966 /* fall-through */ in ZBUFFv05_decompressContinue()
3969 size_t toFlushSize = zbc->outEnd - zbc->outStart; in ZBUFFv05_decompressContinue()
3970 … size_t flushedSize = ZBUFFv05_limitCopy(op, oend-op, zbc->outBuff + zbc->outStart, toFlushSize); in ZBUFFv05_decompressContinue()
3972 zbc->outStart += flushedSize; in ZBUFFv05_decompressContinue()
3974 zbc->stage = ZBUFFv05ds_read; in ZBUFFv05_decompressContinue()
3975 if (zbc->outStart + BLOCKSIZE > zbc->outBuffSize) in ZBUFFv05_decompressContinue()
3976 zbc->outStart = zbc->outEnd = 0; in ZBUFFv05_decompressContinue()
3986 *srcSizePtr = ip-istart; in ZBUFFv05_decompressContinue()
3987 *maxDstSizePtr = op-ostart; in ZBUFFv05_decompressContinue()
3989 { size_t nextSrcSizeHint = ZSTDv05_nextSrcSizeToDecompress(zbc->zc); in ZBUFFv05_decompressContinue()
3991 nextSrcSizeHint -= zbc->inPos; /* already loaded*/ in ZBUFFv05_decompressContinue()