Home
last modified time | relevance | path

Searched refs:litSize (Results 1 – 13 of 13) sorted by relevance

/external/zstd/lib/compress/
Dzstd_compress_superblock.c281 size_t const litSize = seqStorePtr->lit - seqStorePtr->litStart; in ZSTD_buildSuperBlockEntropy() local
284 ZSTD_buildSuperBlockEntropy_literal(seqStorePtr->litStart, litSize, in ZSTD_buildSuperBlockEntropy()
321 const BYTE* literals, size_t litSize, in ZSTD_compressSubBlock_literal() argument
326 size_t const lhSize = 3 + (litSize >= (1 KB - header)) + (litSize >= (16 KB - header)); in ZSTD_compressSubBlock_literal()
336 …DEBUGLOG(5, "ZSTD_compressSubBlock_literal (litSize=%zu, lhSize=%zu, writeEntropy=%d)", litSize, l… in ZSTD_compressSubBlock_literal()
339 if (litSize == 0 || hufMetadata->hType == set_basic) { in ZSTD_compressSubBlock_literal()
341 return ZSTD_noCompressLiterals(dst, dstSize, literals, litSize); in ZSTD_compressSubBlock_literal()
344 return ZSTD_compressRleLiteralsBlock(dst, dstSize, literals, litSize); in ZSTD_compressSubBlock_literal()
347 assert(litSize > 0); in ZSTD_compressSubBlock_literal()
358 … size_t cSize = singleStream ? HUF_compress1X_usingCTable(op, oend-op, literals, litSize, hufTable) in ZSTD_compressSubBlock_literal()
[all …]
Dzstd_compress.c2185 size_t const litSize = (size_t)(seqStorePtr->lit - literals); in ZSTD_entropyCompressSequences_internal() local
2191 literals, litSize, in ZSTD_entropyCompressSequences_internal()
/external/zstd/lib/decompress/
Dzstd_decompress_block.c97 { size_t lhSize, litSize, litCSize; in ZSTD_decodeLiteralsBlock() local
108 litSize = (lhc >> 4) & 0x3FF; in ZSTD_decodeLiteralsBlock()
114 litSize = (lhc >> 4) & 0x3FFF; in ZSTD_decodeLiteralsBlock()
120 litSize = (lhc >> 4) & 0x3FFFF; in ZSTD_decodeLiteralsBlock()
124 RETURN_ERROR_IF(litSize > ZSTD_BLOCKSIZE_MAX, corruption_detected, ""); in ZSTD_decodeLiteralsBlock()
128 if (dctx->ddictIsCold && (litSize > 768 /* heuristic */)) { in ZSTD_decodeLiteralsBlock()
135 dctx->litBuffer, litSize, istart+lhSize, litCSize, in ZSTD_decodeLiteralsBlock()
139 dctx->litBuffer, litSize, istart+lhSize, litCSize, in ZSTD_decodeLiteralsBlock()
146 dctx->entropy.hufTable, dctx->litBuffer, litSize, in ZSTD_decodeLiteralsBlock()
151 dctx->entropy.hufTable, dctx->litBuffer, litSize, in ZSTD_decodeLiteralsBlock()
[all …]
Dzstd_decompress_internal.h128 size_t litSize; member
/external/zstd/tests/
Ddecodecorpus.c369 size_t litSize; in writeLiteralsBlockSimple() local
383 litSize = RAND(seed) % (maxLitSize + 1); in writeLiteralsBlockSimple()
384 if (frame->src == frame->srcStart && litSize == 0) { in writeLiteralsBlockSimple()
385 litSize = 1; /* no empty literals if there's nothing preceding this block */ in writeLiteralsBlockSimple()
387 if (litSize + 3 > contentSize) { in writeLiteralsBlockSimple()
388 litSize = contentSize; /* no matches shorter than 3 are allowed */ in writeLiteralsBlockSimple()
391 if (litSize < 32) { in writeLiteralsBlockSimple()
392 op[0] = (type | (0 << 2) | (litSize << 3)) & 0xff; in writeLiteralsBlockSimple()
394 } else if (litSize < 4096) { in writeLiteralsBlockSimple()
395 op[0] = (type | (1 << 2) | (litSize << 4)) & 0xff; in writeLiteralsBlockSimple()
[all …]
Dfullbench.c148 size_t lhSize, litSize, litCSize; in ZSTD_decodeLiteralsHeader() local
156 litSize = (lhc >> 4) & 0x3FF; in ZSTD_decodeLiteralsHeader()
162 litSize = (lhc >> 4) & 0x3FFF; in ZSTD_decodeLiteralsHeader()
168 litSize = (lhc >> 4) & 0x3FFFF; in ZSTD_decodeLiteralsHeader()
172 RETURN_ERROR_IF(litSize > ZSTD_BLOCKSIZE_MAX, corruption_detected, ""); in ZSTD_decodeLiteralsHeader()
/external/zstd/lib/legacy/
Dzstd_v05.c2664 size_t litSize; member
2878 size_t litSize, litCSize, singleStream=0; in ZSTDv05_decodeLiteralsBlock() local
2887 litSize = ((istart[0] & 15) << 6) + (istart[1] >> 2); in ZSTDv05_decodeLiteralsBlock()
2893 litSize = ((istart[0] & 15) << 10) + (istart[1] << 2) + (istart[2] >> 6); in ZSTDv05_decodeLiteralsBlock()
2899 litSize = ((istart[0] & 15) << 14) + (istart[1] << 6) + (istart[2] >> 2); in ZSTDv05_decodeLiteralsBlock()
2903 if (litSize > BLOCKSIZE) return ERROR(corruption_detected); in ZSTDv05_decodeLiteralsBlock()
2907 … HUFv05_decompress1X2(dctx->litBuffer, litSize, istart+lhSize, litCSize) : in ZSTDv05_decodeLiteralsBlock()
2908 … HUFv05_decompress (dctx->litBuffer, litSize, istart+lhSize, litCSize) )) in ZSTDv05_decodeLiteralsBlock()
2912 dctx->litSize = litSize; in ZSTDv05_decodeLiteralsBlock()
2913 memset(dctx->litBuffer + dctx->litSize, 0, WILDCOPY_OVERLENGTH); in ZSTDv05_decodeLiteralsBlock()
[all …]
Dzstd_v06.c2825 size_t litSize; member
3069 { size_t litSize, litCSize, singleStream=0; in ZSTDv06_decodeLiteralsBlock() local
3078 litSize = ((istart[0] & 15) << 6) + (istart[1] >> 2); in ZSTDv06_decodeLiteralsBlock()
3084 litSize = ((istart[0] & 15) << 10) + (istart[1] << 2) + (istart[2] >> 6); in ZSTDv06_decodeLiteralsBlock()
3090 litSize = ((istart[0] & 15) << 14) + (istart[1] << 6) + (istart[2] >> 2); in ZSTDv06_decodeLiteralsBlock()
3094 if (litSize > ZSTDv06_BLOCKSIZE_MAX) return ERROR(corruption_detected); in ZSTDv06_decodeLiteralsBlock()
3098 … HUFv06_decompress1X2(dctx->litBuffer, litSize, istart+lhSize, litCSize) : in ZSTDv06_decodeLiteralsBlock()
3099 … HUFv06_decompress (dctx->litBuffer, litSize, istart+lhSize, litCSize) )) in ZSTDv06_decodeLiteralsBlock()
3103 dctx->litSize = litSize; in ZSTDv06_decodeLiteralsBlock()
3104 memset(dctx->litBuffer + dctx->litSize, 0, WILDCOPY_OVERLENGTH); in ZSTDv06_decodeLiteralsBlock()
[all …]
Dzstd_v03.c2457 size_t litSize; member
2498 …const size_t litSize = (MEM_readLE32(src) & 0x1FFFFF) >> 2; /* no buffer issue : srcSize >= MIN_… in ZSTD_decompressLiterals() local
2501 if (litSize > *maxDstSizePtr) return ERROR(corruption_detected); in ZSTD_decompressLiterals()
2504 … if (HUF_isError(HUF_decompress(dst, litSize, ip+5, litCSize))) return ERROR(corruption_detected); in ZSTD_decompressLiterals()
2506 *maxDstSizePtr = litSize; in ZSTD_decompressLiterals()
2527 size_t litSize = BLOCKSIZE; in ZSTD_decodeLiteralsBlock() local
2528 … const size_t readSize = ZSTD_decompressLiterals(dctx->litBuffer, &litSize, src, srcSize); in ZSTD_decodeLiteralsBlock()
2530 dctx->litSize = litSize; in ZSTD_decodeLiteralsBlock()
2531 memset(dctx->litBuffer + dctx->litSize, 0, 8); in ZSTD_decodeLiteralsBlock()
2536 …const size_t litSize = (MEM_readLE32(istart) & 0xFFFFFF) >> 2; /* no buffer issue : srcSize >= M… in ZSTD_decodeLiteralsBlock() local
[all …]
Dzstd_v07.c2955 size_t litSize; member
3298 { size_t litSize, litCSize, singleStream=0; in ZSTDv07_decodeLiteralsBlock() local
3307 litSize = ((istart[0] & 15) << 6) + (istart[1] >> 2); in ZSTDv07_decodeLiteralsBlock()
3313 litSize = ((istart[0] & 15) << 10) + (istart[1] << 2) + (istart[2] >> 6); in ZSTDv07_decodeLiteralsBlock()
3319 litSize = ((istart[0] & 15) << 14) + (istart[1] << 6) + (istart[2] >> 2); in ZSTDv07_decodeLiteralsBlock()
3323 if (litSize > ZSTDv07_BLOCKSIZE_ABSOLUTEMAX) return ERROR(corruption_detected); in ZSTDv07_decodeLiteralsBlock()
3327 … HUFv07_decompress1X2_DCtx(dctx->hufTable, dctx->litBuffer, litSize, istart+lhSize, litCSize) : in ZSTDv07_decodeLiteralsBlock()
3328 … HUFv07_decompress4X_hufOnly (dctx->hufTable, dctx->litBuffer, litSize, istart+lhSize, litCSize) )) in ZSTDv07_decodeLiteralsBlock()
3332 dctx->litSize = litSize; in ZSTDv07_decodeLiteralsBlock()
3334 memset(dctx->litBuffer + dctx->litSize, 0, WILDCOPY_OVERLENGTH); in ZSTDv07_decodeLiteralsBlock()
[all …]
Dzstd_v04.c2513 size_t litSize; member
2624 …const size_t litSize = (MEM_readLE32(src) & 0x1FFFFF) >> 2; /* no buffer issue : srcSize >= MIN_… in ZSTD_decompressLiterals() local
2627 if (litSize > *maxDstSizePtr) return ERROR(corruption_detected); in ZSTD_decompressLiterals()
2630 … if (HUF_isError(HUF_decompress(dst, litSize, ip+5, litCSize))) return ERROR(corruption_detected); in ZSTD_decompressLiterals()
2632 *maxDstSizePtr = litSize; in ZSTD_decompressLiterals()
2652 size_t litSize = BLOCKSIZE; in ZSTD_decodeLiteralsBlock() local
2653 … const size_t readSize = ZSTD_decompressLiterals(dctx->litBuffer, &litSize, src, srcSize); in ZSTD_decodeLiteralsBlock()
2655 dctx->litSize = litSize; in ZSTD_decodeLiteralsBlock()
2656 memset(dctx->litBuffer + dctx->litSize, 0, 8); in ZSTD_decodeLiteralsBlock()
2661 …const size_t litSize = (MEM_readLE32(istart) & 0xFFFFFF) >> 2; /* no buffer issue : srcSize >= M… in ZSTD_decodeLiteralsBlock() local
[all …]
Dzstd_v02.c2816 size_t litSize; member
2857 …const size_t litSize = (MEM_readLE32(src) & 0x1FFFFF) >> 2; /* no buffer issue : srcSize >= MIN_… in ZSTD_decompressLiterals() local
2860 if (litSize > *maxDstSizePtr) return ERROR(corruption_detected); in ZSTD_decompressLiterals()
2863 … if (HUF_isError(HUF_decompress(dst, litSize, ip+5, litCSize))) return ERROR(corruption_detected); in ZSTD_decompressLiterals()
2865 *maxDstSizePtr = litSize; in ZSTD_decompressLiterals()
2886 size_t litSize = BLOCKSIZE; in ZSTD_decodeLiteralsBlock() local
2887 … const size_t readSize = ZSTD_decompressLiterals(dctx->litBuffer, &litSize, src, srcSize); in ZSTD_decodeLiteralsBlock()
2889 dctx->litSize = litSize; in ZSTD_decodeLiteralsBlock()
2890 memset(dctx->litBuffer + dctx->litSize, 0, 8); in ZSTD_decodeLiteralsBlock()
2895 …const size_t litSize = (MEM_readLE32(istart) & 0xFFFFFF) >> 2; /* no buffer issue : srcSize >= M… in ZSTD_decodeLiteralsBlock() local
[all …]
Dzstd_v01.c1505 size_t litSize; in ZSTD_decompressLiterals() local
1510 litSize = ip[1] + (ip[0]<<8); in ZSTD_decompressLiterals()
1511 litSize += ((ip[-3] >> 3) & 7) << 16; /* mmmmh.... */ in ZSTD_decompressLiterals()
1512 op = oend - litSize; in ZSTD_decompressLiterals()
1515 if (litSize > maxDstSize) return ERROR(dstSize_tooSmall); in ZSTD_decompressLiterals()
1516 errorCode = HUF_decompress(op, litSize, ip+2, srcSize-2); in ZSTD_decompressLiterals()
1518 return litSize; in ZSTD_decompressLiterals()
1524 const BYTE** litStart, size_t* litSize, in ZSTDv01_decodeLiteralsBlock() argument
1543 *litSize = litcSize; in ZSTDv01_decodeLiteralsBlock()
1554 *litSize = rleSize; in ZSTDv01_decodeLiteralsBlock()
[all …]