/freebsd/sys/contrib/openzfs/module/zstd/lib/decompress/ |
H A D | huf_decompress.c | 383 size_t const hSize = HUF_readDTableX1_wksp(DCtx, cSrc, cSrcSize, workSpace, wkspSize); in HUF_decompress1X1_DCtx_wksp() local 384 if (HUF_isError(hSize)) return hSize; in HUF_decompress1X1_DCtx_wksp() 385 if (hSize >= cSrcSize) return ERROR(srcSize_wrong); in HUF_decompress1X1_DCtx_wksp() 386 ip += hSize; cSrcSize -= hSize; in HUF_decompress1X1_DCtx_wksp() 422 size_t const hSize = HUF_readDTableX1_wksp (dctx, cSrc, cSrcSize, in HUF_decompress4X1_DCtx_wksp_bmi2() local 424 if (HUF_isError(hSize)) return hSize; in HUF_decompress4X1_DCtx_wksp_bmi2() 425 if (hSize >= cSrcSize) return ERROR(srcSize_wrong); in HUF_decompress4X1_DCtx_wksp_bmi2() 426 ip += hSize; cSrcSize -= hSize; in HUF_decompress4X1_DCtx_wksp_bmi2() 883 size_t const hSize = HUF_readDTableX2_wksp(DCtx, cSrc, cSrcSize, in HUF_decompress1X2_DCtx_wksp() local 885 if (HUF_isError(hSize)) return hSize; in HUF_decompress1X2_DCtx_wksp() [all …]
|
H A D | zstd_decompress.c | 1073 size_t const hSize = HUF_readDTableX1_wksp(entropy->hufTable, in ZSTD_loadDEntropy() local 1077 size_t const hSize = HUF_readDTableX2_wksp(entropy->hufTable, in ZSTD_loadDEntropy() local 1081 RETURN_ERROR_IF(HUF_isError(hSize), dictionary_corrupted, ""); in ZSTD_loadDEntropy() 1082 dictPtr += hSize; in ZSTD_loadDEntropy() 1637 …{ size_t const hSize = ZSTD_getFrameHeader_advanced(&zds->fParams, zds->headerBuffer, zds->lhSiz… in ZSTD_decompressStream() local 1638 DEBUGLOG(5, "header size : %u", (U32)hSize); in ZSTD_decompressStream() 1639 if (ZSTD_isError(hSize)) { in ZSTD_decompressStream() 1658 return hSize; /* error */ in ZSTD_decompressStream() 1660 if (hSize != 0) { /* need more input */ in ZSTD_decompressStream() 1661 … size_t const toLoad = hSize - zds->lhSize; /* if hSize!=0, hSize > zds->lhSize */ in ZSTD_decompressStream() [all …]
|
/freebsd/sys/contrib/zstd/lib/decompress/ |
H A D | huf_decompress.c | 769 size_t const hSize = HUF_readDTableX1_wksp(DCtx, cSrc, cSrcSize, workSpace, wkspSize); in HUF_decompress1X1_DCtx_wksp() local 770 if (HUF_isError(hSize)) return hSize; in HUF_decompress1X1_DCtx_wksp() 771 if (hSize >= cSrcSize) return ERROR(srcSize_wrong); in HUF_decompress1X1_DCtx_wksp() 772 ip += hSize; cSrcSize -= hSize; in HUF_decompress1X1_DCtx_wksp() 794 … size_t const hSize = HUF_readDTableX1_wksp_bmi2(dctx, cSrc, cSrcSize, workSpace, wkspSize, bmi2); in HUF_decompress4X1_DCtx_wksp_bmi2() local 795 if (HUF_isError(hSize)) return hSize; in HUF_decompress4X1_DCtx_wksp_bmi2() 796 if (hSize >= cSrcSize) return ERROR(srcSize_wrong); in HUF_decompress4X1_DCtx_wksp_bmi2() 797 ip += hSize; cSrcSize -= hSize; in HUF_decompress4X1_DCtx_wksp_bmi2() 1475 size_t const hSize = HUF_readDTableX2_wksp(DCtx, cSrc, cSrcSize, in HUF_decompress1X2_DCtx_wksp() local 1477 if (HUF_isError(hSize)) return hSize; in HUF_decompress1X2_DCtx_wksp() [all …]
|
H A D | zstd_decompress.c | 1351 size_t const hSize = HUF_readDTableX1_wksp(entropy->hufTable, in ZSTD_loadDEntropy() local 1355 size_t const hSize = HUF_readDTableX2_wksp(entropy->hufTable, in ZSTD_loadDEntropy() local 1359 RETURN_ERROR_IF(HUF_isError(hSize), dictionary_corrupted, ""); in ZSTD_loadDEntropy() 1360 dictPtr += hSize; in ZSTD_loadDEntropy() 1979 …{ size_t const hSize = ZSTD_getFrameHeader_advanced(&zds->fParams, zds->headerBuffer, zds->lhSiz… in ZSTD_decompressStream() local 1983 DEBUGLOG(5, "header size : %u", (U32)hSize); in ZSTD_decompressStream() 1984 if (ZSTD_isError(hSize)) { in ZSTD_decompressStream() 2003 return hSize; /* error */ in ZSTD_decompressStream() 2005 if (hSize != 0) { /* need more input */ in ZSTD_decompressStream() 2006 … size_t const toLoad = hSize - zds->lhSize; /* if hSize!=0, hSize > zds->lhSize */ in ZSTD_decompressStream() [all …]
|
/freebsd/sys/contrib/zstd/lib/dictBuilder/ |
H A D | zdict.c | 935 size_t hSize; in ZDICT_finalizeDictionary() local 956 hSize = 8; in ZDICT_finalizeDictionary() 961 { size_t const eSize = ZDICT_analyzeEntropy(header+hSize, HBUFFSIZE-hSize, in ZDICT_finalizeDictionary() 967 hSize += eSize; in ZDICT_finalizeDictionary() 971 if (hSize + dictContentSize > dictBufferCapacity) { in ZDICT_finalizeDictionary() 972 dictContentSize = dictBufferCapacity - hSize; in ZDICT_finalizeDictionary() 977 RETURN_ERROR_IF(hSize + minContentSize > dictBufferCapacity, dstSize_tooSmall, in ZDICT_finalizeDictionary() 985 size_t const dictSize = hSize + paddingSize + dictContentSize; in ZDICT_finalizeDictionary() 992 BYTE* const outDictPadding = outDictHeader + hSize; in ZDICT_finalizeDictionary() 1004 memcpy(outDictHeader, header, hSize); in ZDICT_finalizeDictionary() [all …]
|
/freebsd/sys/contrib/openzfs/module/zstd/lib/compress/ |
H A D | huf_compress.c | 91 { CHECK_V_F(hSize, FSE_writeNCount(op, (size_t)(oend-op), norm, maxSymbolValue, tableLog) ); in HUF_compressWeights() 92 op += hSize; in HUF_compressWeights() 133 { CHECK_V_F(hSize, HUF_compressWeights(op+1, maxDstSize-1, huffWeight, maxSymbolValue) ); in HUF_writeCTable() 134 if ((hSize>1) & (hSize < maxSymbolValue/2)) { /* FSE compressed */ in HUF_writeCTable() 135 op[0] = (BYTE)hSize; in HUF_writeCTable() 136 return hSize+1; in HUF_writeCTable() 703 { CHECK_V_F(hSize, HUF_writeCTable (op, dstSize, table->CTable, maxSymbolValue, huffLog) ); in HUF_compress_internal() 708 if (oldSize <= hSize + newSize || hSize + 12 >= srcSize) { in HUF_compress_internal() 715 if (hSize + 12ul >= srcSize) { return 0; } in HUF_compress_internal() 716 op += hSize; in HUF_compress_internal()
|
H A D | zstd_compress_superblock.c | 131 size_t const hSize = HUF_writeCTable( in ZSTD_buildSuperBlockEntropy_literal() local 138 if (oldCSize < srcSize && (oldCSize <= hSize + newCSize || hSize + 12 >= srcSize)) { in ZSTD_buildSuperBlockEntropy_literal() 145 if (newCSize + hSize >= srcSize) { in ZSTD_buildSuperBlockEntropy_literal() 151 DEBUGLOG(5, "set_compressed (hSize=%u)", (U32)hSize); in ZSTD_buildSuperBlockEntropy_literal() 154 return hSize; in ZSTD_buildSuperBlockEntropy_literal()
|
H A D | zstd_compress.c | 1103 size_t const hSize = ((size_t)1) << cParams->hashLog; in ZSTD_sizeof_matchState() local 1109 + hSize * sizeof(U32) in ZSTD_sizeof_matchState() 1122 (U32)chainSize, (U32)hSize, (U32)h3Size); in ZSTD_sizeof_matchState() 1353 size_t const hSize = ((size_t)1) << cParams->hashLog; in ZSTD_reset_matchState() local 1373 ms->hashTable = (U32*)ZSTD_cwksp_reserve_table(ws, hSize * sizeof(U32)); in ZSTD_reset_matchState() 1704 size_t const hSize = (size_t)1 << cdict_cParams->hashLog; in ZSTD_resetCCtx_byCopyingCDict() local 1708 hSize * sizeof(U32)); in ZSTD_resetCCtx_byCopyingCDict() 1796 size_t const hSize = (size_t)1 << srcCCtx->appliedParams.cParams.hashLog; in ZSTD_copyCCtx_internal() local 1802 hSize * sizeof(U32)); in ZSTD_copyCCtx_internal() 1904 { U32 const hSize = (U32)1 << params->cParams.hashLog; in ZSTD_reduceIndex() local [all …]
|
/freebsd/sys/contrib/zstd/lib/legacy/ |
H A D | zstd_v07.c | 1905 size_t const hSize = HUFv07_readDTableX2 (DCtx, cSrc, cSrcSize); in HUFv07_decompress1X2_DCtx() local 1906 if (HUFv07_isError(hSize)) return hSize; in HUFv07_decompress1X2_DCtx() 1907 if (hSize >= cSrcSize) return ERROR(srcSize_wrong); in HUFv07_decompress1X2_DCtx() 1908 ip += hSize; cSrcSize -= hSize; in HUFv07_decompress1X2_DCtx() 2028 size_t const hSize = HUFv07_readDTableX2 (dctx, cSrc, cSrcSize); in HUFv07_decompress4X2_DCtx() local 2029 if (HUFv07_isError(hSize)) return hSize; in HUFv07_decompress4X2_DCtx() 2030 if (hSize >= cSrcSize) return ERROR(srcSize_wrong); in HUFv07_decompress4X2_DCtx() 2031 ip += hSize; cSrcSize -= hSize; in HUFv07_decompress4X2_DCtx() 2317 size_t const hSize = HUFv07_readDTableX4 (DCtx, cSrc, cSrcSize); in HUFv07_decompress1X4_DCtx() local 2318 if (HUFv07_isError(hSize)) return hSize; in HUFv07_decompress1X4_DCtx() [all …]
|
H A D | zstd_v06.c | 2497 size_t const hSize = HUFv06_readDTableX4 (DTable, cSrc, cSrcSize); in HUFv06_decompress1X4() local 2498 if (HUFv06_isError(hSize)) return hSize; in HUFv06_decompress1X4() 2499 if (hSize >= cSrcSize) return ERROR(srcSize_wrong); in HUFv06_decompress1X4() 2500 ip += hSize; in HUFv06_decompress1X4() 2501 cSrcSize -= hSize; in HUFv06_decompress1X4() 2605 size_t hSize = HUFv06_readDTableX4 (DTable, cSrc, cSrcSize); in HUFv06_decompress4X4() local 2606 if (HUFv06_isError(hSize)) return hSize; in HUFv06_decompress4X4() 2607 if (hSize >= cSrcSize) return ERROR(srcSize_wrong); in HUFv06_decompress4X4() 2608 ip += hSize; in HUFv06_decompress4X4() 2609 cSrcSize -= hSize; in HUFv06_decompress4X4() [all …]
|
H A D | zstd_v05.c | 2369 size_t hSize = HUFv05_readDTableX4 (DTable, cSrc, cSrcSize); in HUFv05_decompress1X4() local 2370 if (HUFv05_isError(hSize)) return hSize; in HUFv05_decompress1X4() 2371 if (hSize >= cSrcSize) return ERROR(srcSize_wrong); in HUFv05_decompress1X4() 2372 ip += hSize; in HUFv05_decompress1X4() 2373 cSrcSize -= hSize; in HUFv05_decompress1X4() 2478 size_t hSize = HUFv05_readDTableX4 (DTable, cSrc, cSrcSize); in HUFv05_decompress4X4() local 2479 if (HUFv05_isError(hSize)) return hSize; in HUFv05_decompress4X4() 2480 if (hSize >= cSrcSize) return ERROR(srcSize_wrong); in HUFv05_decompress4X4() 2481 ip += hSize; in HUFv05_decompress4X4() 2482 cSrcSize -= hSize; in HUFv05_decompress4X4() [all …]
|
H A D | zstd_v02.c | 2181 size_t hSize = HUF_readDTableX4 (DTable, cSrc, cSrcSize); in HUF_decompress4X4() local 2182 if (HUF_isError(hSize)) return hSize; in HUF_decompress4X4() 2183 if (hSize >= cSrcSize) return ERROR(srcSize_wrong); in HUF_decompress4X4() 2184 ip += hSize; in HUF_decompress4X4() 2185 cSrcSize -= hSize; in HUF_decompress4X4() 2538 size_t hSize = HUF_readDTableX6 (DTable, cSrc, cSrcSize); in HUF_decompress4X6() local 2539 if (HUF_isError(hSize)) return hSize; in HUF_decompress4X6() 2540 if (hSize >= cSrcSize) return ERROR(srcSize_wrong); in HUF_decompress4X6() 2541 ip += hSize; in HUF_decompress4X6() 2542 cSrcSize -= hSize; in HUF_decompress4X6()
|
H A D | zstd_v03.c | 2178 size_t hSize = HUF_readDTableX4 (DTable, cSrc, cSrcSize); in HUF_decompress4X4() local 2179 if (HUF_isError(hSize)) return hSize; in HUF_decompress4X4() 2180 if (hSize >= cSrcSize) return ERROR(srcSize_wrong); in HUF_decompress4X4() 2181 ip += hSize; in HUF_decompress4X4() 2182 cSrcSize -= hSize; in HUF_decompress4X4()
|
H A D | zstd_v04.c | 2325 size_t hSize = HUF_readDTableX4 (DTable, cSrc, cSrcSize); in HUF_decompress4X4() local 2326 if (HUF_isError(hSize)) return hSize; in HUF_decompress4X4() 2327 if (hSize >= cSrcSize) return ERROR(srcSize_wrong); in HUF_decompress4X4() 2328 ip += hSize; in HUF_decompress4X4() 2329 cSrcSize -= hSize; in HUF_decompress4X4()
|
/freebsd/sys/contrib/zstd/lib/compress/ |
H A D | huf_compress.c | 117 …{ CHECK_V_F(hSize, FSE_writeNCount(op, (size_t)(oend-op), wksp->norm, maxSymbolValue, tableLog) … in HUF_compressWeights() 118 op += hSize; in HUF_compressWeights() 194 …{ CHECK_V_F(hSize, HUF_compressWeights(op+1, maxDstSize-1, wksp->huffWeight, maxSymbolValue, &wk… in HUF_writeCTable_wksp() 195 if ((hSize>1) & (hSize < maxSymbolValue/2)) { /* FSE compressed */ in HUF_writeCTable_wksp() 196 op[0] = (BYTE)hSize; in HUF_writeCTable_wksp() 197 return hSize+1; in HUF_writeCTable_wksp() 1260 { CHECK_V_F(hSize, HUF_writeCTable_wksp(op, dstSize, table->CTable, maxSymbolValue, huffLog, in HUF_compress_internal() 1266 if (oldSize <= hSize + newSize || hSize + 12 >= srcSize) { in HUF_compress_internal() 1273 if (hSize + 12ul >= srcSize) { return 0; } in HUF_compress_internal() 1274 op += hSize; in HUF_compress_internal()
|
H A D | zstd_compress.c | 1426 size_t const hSize = ((size_t)1) << cParams->hashLog; in ZSTD_sizeof_matchState() local 1432 + hSize * sizeof(U32) in ZSTD_sizeof_matchState() 1442 ? ZSTD_cwksp_aligned_alloc_size(hSize*sizeof(U16)) in ZSTD_sizeof_matchState() 1454 (U32)chainSize, (U32)hSize, (U32)h3Size); in ZSTD_sizeof_matchState() 1734 size_t const hSize = ((size_t)1) << cParams->hashLog; in ZSTD_reset_matchState() local 1755 ms->hashTable = (U32*)ZSTD_cwksp_reserve_table(ws, hSize * sizeof(U32)); in ZSTD_reset_matchState() 1780 size_t const tagTableSize = hSize*sizeof(U16); in ZSTD_reset_matchState() 2134 size_t const hSize = (size_t)1 << cdict_cParams->hashLog; in ZSTD_resetCCtx_byCopyingCDict() local 2138 hSize * sizeof(U32)); in ZSTD_resetCCtx_byCopyingCDict() 2147 size_t const tagTableSize = hSize*sizeof(U16); in ZSTD_resetCCtx_byCopyingCDict() [all …]
|
H A D | zstdmt_compress.c | 722 …size_t const hSize = ZSTD_compressContinue(cctx, dstBuff.start, dstBuff.capacity, job->src.start, … in ZSTDMT_compressionJob() local 723 if (ZSTD_isError(hSize)) JOB_ERROR(hSize); in ZSTDMT_compressionJob() 724 …"ZSTDMT_compressionJob: flush and overwrite %u bytes of frame header (not first job)", (U32)hSize); in ZSTDMT_compressionJob()
|