/freebsd/sys/contrib/zstd/lib/compress/ |
H A D | zstd_compress_sequences.c | 63 return nbSeq >= 2048; in ZSTD_useLowProbCount() 76 …RWARD_IF_ERROR(FSE_normalizeCount(norm, tableLog, count, nbSeq, max, ZSTD_useLowProbCount(nbSeq)),… in ZSTD_NCountCost() 166 if (mostFrequent == nbSeq) { in ZSTD_selectEncodingType() 168 if (isDefaultAllowed && nbSeq <= 2) { in ZSTD_selectEncodingType() 269 size_t nbSeq_1 = nbSeq; in ZSTD_buildCTable() 271 if (count[codeTable[nbSeq-1]] > 1) { in ZSTD_buildCTable() 272 count[codeTable[nbSeq-1]]--; in ZSTD_buildCTable() 314 BIT_addBits(&blockStream, sequences[nbSeq-1].litLength, LL_bits[llCodeTable[nbSeq-1]]); in ZSTD_encodeSequences_body() 316 BIT_addBits(&blockStream, sequences[nbSeq-1].mlBase, ML_bits[mlCodeTable[nbSeq-1]]); in ZSTD_encodeSequences_body() 328 BIT_addBits(&blockStream, sequences[nbSeq-1].offBase, ofCodeTable[nbSeq-1]); in ZSTD_encodeSequences_body() [all …]
|
H A D | zstd_compress_superblock.c | 131 const seqDef* const send = sequences + nbSeq; in ZSTD_seqDecompressedSize() 179 if (nbSeq < 0x7F) in ZSTD_compressSubBlock_sequences() 180 *op++ = (BYTE)nbSeq; in ZSTD_compressSubBlock_sequences() 181 else if (nbSeq < LONGNBSEQ) in ZSTD_compressSubBlock_sequences() 182 op[0] = (BYTE)((nbSeq>>8) + 0x80), op[1] = (BYTE)nbSeq, op+=2; in ZSTD_compressSubBlock_sequences() 185 if (nbSeq==0) { in ZSTD_compressSubBlock_sequences() 212 sequences, nbSeq, in ZSTD_compressSubBlock_sequences() 335 const BYTE* const ctEnd = ctStart + nbSeq; in ZSTD_estimateSubBlockSize_symbolType() 363 size_t nbSeq, in ZSTD_estimateSubBlockSize_sequences() argument 371 if (nbSeq == 0) return sequencesSectionHeaderSize; in ZSTD_estimateSubBlockSize_sequences() [all …]
|
H A D | zstd_compress_sequences.h | 25 size_t const mostFrequent, size_t nbSeq, unsigned const FSELog, 35 const BYTE* codeTable, size_t nbSeq, 45 seqDef const* sequences, size_t nbSeq, int longOffsets, int bmi2);
|
H A D | zstd_compress.c | 2397 for (u=0; u<nbSeq; u++) { in ZSTD_seqToCodes() 2628 if (nbSeq < 128) { in ZSTD_entropyCompressSeqStore_internal() 2629 *op++ = (BYTE)nbSeq; in ZSTD_entropyCompressSeqStore_internal() 2630 } else if (nbSeq < LONGNBSEQ) { in ZSTD_entropyCompressSeqStore_internal() 2632 op[1] = (BYTE)nbSeq; in ZSTD_entropyCompressSeqStore_internal() 2640 if (nbSeq==0) { in ZSTD_entropyCompressSeqStore_internal() 3191 stats = nbSeq != 0 ? ZSTD_buildSequencesStatistics(seqStorePtr, nbSeq, in ZSTD_buildBlockEntropyStats_sequences() 3289 return nbSeq * 10; in ZSTD_estimateBlockSize_symbolType() 3468 for (; idx < nbSeq; ++idx) { in ZSTD_seqStore_resolveOffCodes() 3627 if (nbSeq <= 4) { in ZSTD_deriveBlockSplits() [all …]
|
H A D | zstdmt_compress.c | 320 static void ZSTDMT_setNbSeq(ZSTDMT_seqPool* const seqPool, size_t const nbSeq) in ZSTDMT_setNbSeq() argument 322 ZSTDMT_setBufferSize(seqPool, nbSeq * sizeof(rawSeq)); in ZSTDMT_setNbSeq()
|
H A D | zstd_compress_internal.h | 1447 size_t ZSTD_referenceExternalSequences(ZSTD_CCtx* cctx, rawSeq* seq, size_t nbSeq);
|
/freebsd/sys/contrib/openzfs/module/zstd/lib/compress/ |
H A D | zstd_compress_sequences.c | 151 if (mostFrequent == nbSeq) { in ZSTD_selectEncodingType() 153 if (isDefaultAllowed && nbSeq <= 2) { in ZSTD_selectEncodingType() 177 if ( (nbSeq < dynamicFse_nbSeq_min) in ZSTD_selectEncodingType() 249 size_t nbSeq_1 = nbSeq; in ZSTD_buildCTable() 251 if (count[codeTable[nbSeq-1]] > 1) { in ZSTD_buildCTable() 252 count[codeTable[nbSeq-1]]--; in ZSTD_buildCTable() 291 BIT_addBits(&blockStream, sequences[nbSeq-1].litLength, LL_bits[llCodeTable[nbSeq-1]]); in ZSTD_encodeSequences_body() 293 BIT_addBits(&blockStream, sequences[nbSeq-1].matchLength, ML_bits[mlCodeTable[nbSeq-1]]); in ZSTD_encodeSequences_body() 296 U32 const ofBits = ofCodeTable[nbSeq-1]; in ZSTD_encodeSequences_body() 305 BIT_addBits(&blockStream, sequences[nbSeq-1].offset, ofCodeTable[nbSeq-1]); in ZSTD_encodeSequences_body() [all …]
|
H A D | zstd_compress_superblock.c | 409 const seqDef* const send = sequences + nbSeq; in ZSTD_seqDecompressedSize() 456 if (nbSeq < 0x7F) in ZSTD_compressSubBlock_sequences() 457 *op++ = (BYTE)nbSeq; in ZSTD_compressSubBlock_sequences() 458 else if (nbSeq < LONGNBSEQ) in ZSTD_compressSubBlock_sequences() 459 op[0] = (BYTE)((nbSeq>>8) + 0x80), op[1] = (BYTE)nbSeq, op+=2; in ZSTD_compressSubBlock_sequences() 462 if (nbSeq==0) { in ZSTD_compressSubBlock_sequences() 489 sequences, nbSeq, in ZSTD_compressSubBlock_sequences() 604 size_t nbSeq, const FSE_CTable* fseCTable, in ZSTD_estimateSubBlockSize_symbolType() argument 612 const BYTE* const ctEnd = ctStart + nbSeq; in ZSTD_estimateSubBlockSize_symbolType() 640 size_t nbSeq, in ZSTD_estimateSubBlockSize_sequences() argument [all …]
|
H A D | zstd_compress_sequences.h | 25 size_t const mostFrequent, size_t nbSeq, unsigned const FSELog, 35 const BYTE* codeTable, size_t nbSeq, 45 seqDef const* sequences, size_t nbSeq, int longOffsets, int bmi2);
|
H A D | zstd_compress.c | 1937 assert(nbSeq <= seqStorePtr->maxNbSeq); in ZSTD_seqToCodes() 1938 for (u=0; u<nbSeq; u++) { in ZSTD_seqToCodes() 2012 if (nbSeq < 128) { in ZSTD_compressSequences_internal() 2013 *op++ = (BYTE)nbSeq; in ZSTD_compressSequences_internal() 2014 } else if (nbSeq < LONGNBSEQ) { in ZSTD_compressSequences_internal() 2015 op[0] = (BYTE)((nbSeq>>8) + 0x80); in ZSTD_compressSequences_internal() 2016 op[1] = (BYTE)nbSeq; in ZSTD_compressSequences_internal() 2024 if (nbSeq==0) { in ZSTD_compressSequences_internal() 2051 count, max, llCodeTable, nbSeq, in ZSTD_compressSequences_internal() 2725 cctx->externSeqStore.size = nbSeq; in ZSTD_referenceExternalSequences() [all …]
|
H A D | zstd_compress_internal.h | 1119 size_t ZSTD_referenceExternalSequences(ZSTD_CCtx* cctx, rawSeq* seq, size_t nbSeq);
|
/freebsd/sys/contrib/openzfs/module/zstd/lib/decompress/ |
H A D | zstd_decompress_block.c | 486 int nbSeq; in ZSTD_decodeSeqHeaders() local 493 nbSeq = *ip++; in ZSTD_decodeSeqHeaders() 494 if (!nbSeq) { in ZSTD_decodeSeqHeaders() 499 if (nbSeq > 0x7F) { in ZSTD_decodeSeqHeaders() 500 if (nbSeq == 0xFF) { in ZSTD_decodeSeqHeaders() 505 nbSeq = ((nbSeq-0x80)<<8) + *ip++; in ZSTD_decodeSeqHeaders() 508 *nbSeqPtr = nbSeq; in ZSTD_decodeSeqHeaders() 1002 if (nbSeq) { in ZSTD_decompressSequences_body() 1153 if (nbSeq) { in ZSTD_decompressSequencesLong_body() 1200 for ( ; seqNb<nbSeq ; seqNb++) { in ZSTD_decompressSequencesLong_body() [all …]
|
/freebsd/sys/contrib/zstd/lib/decompress/ |
H A D | zstd_decompress_block.c | 659 int nbSeq; in ZSTD_decodeSeqHeaders() local 666 nbSeq = *ip++; in ZSTD_decodeSeqHeaders() 667 if (!nbSeq) { in ZSTD_decodeSeqHeaders() 672 if (nbSeq > 0x7F) { in ZSTD_decodeSeqHeaders() 673 if (nbSeq == 0xFF) { in ZSTD_decodeSeqHeaders() 679 nbSeq = ((nbSeq-0x80)<<8) + *ip++; in ZSTD_decodeSeqHeaders() 682 *nbSeqPtr = nbSeq; in ZSTD_decodeSeqHeaders() 1342 if (nbSeq) { 1559 if (nbSeq) { 1687 if (nbSeq) { [all …]
|
/freebsd/sys/contrib/zstd/lib/legacy/ |
H A D | zstd_v06.c | 3230 { int nbSeq = *ip++; in ZSTDv06_decodeSeqHeaders() local 3231 if (!nbSeq) { *nbSeqPtr=0; return 1; } in ZSTDv06_decodeSeqHeaders() 3232 if (nbSeq > 0x7F) { in ZSTDv06_decodeSeqHeaders() 3233 if (nbSeq == 0xFF) { in ZSTDv06_decodeSeqHeaders() 3235 nbSeq = MEM_readLE16(ip) + LONGNBSEQ, ip+=2; in ZSTDv06_decodeSeqHeaders() 3238 nbSeq = ((nbSeq-0x80)<<8) + *ip++; in ZSTDv06_decodeSeqHeaders() 3241 *nbSeqPtr = nbSeq; in ZSTDv06_decodeSeqHeaders() 3455 int nbSeq; in ZSTDv06_decompressSequences() local 3465 if (nbSeq) { in ZSTDv06_decompressSequences() 3479 nbSeq--; in ZSTDv06_decompressSequences() [all …]
|
H A D | zstd_v07.c | 3460 { int nbSeq = *ip++; in ZSTDv07_decodeSeqHeaders() local 3461 if (!nbSeq) { *nbSeqPtr=0; return 1; } in ZSTDv07_decodeSeqHeaders() 3462 if (nbSeq > 0x7F) { in ZSTDv07_decodeSeqHeaders() 3463 if (nbSeq == 0xFF) { in ZSTDv07_decodeSeqHeaders() 3465 nbSeq = MEM_readLE16(ip) + LONGNBSEQ, ip+=2; in ZSTDv07_decodeSeqHeaders() 3468 nbSeq = ((nbSeq-0x80)<<8) + *ip++; in ZSTDv07_decodeSeqHeaders() 3471 *nbSeqPtr = nbSeq; in ZSTDv07_decodeSeqHeaders() 3682 int nbSeq; in ZSTDv07_decompressSequences() local 3691 if (nbSeq) { in ZSTDv07_decompressSequences() 3702 nbSeq--; in ZSTDv07_decompressSequences() [all …]
|
H A D | zstd_v01.c | 1572 static size_t ZSTDv01_decodeSeqHeaders(int* nbSeq, const BYTE** dumpsPtr, size_t* dumpsLengthPtr, in ZSTDv01_decodeSeqHeaders() argument 1587 *nbSeq = ZSTD_readLE16(ip); ip+=2; in ZSTDv01_decodeSeqHeaders() 1861 int nbSeq; in ZSTD_decompressSequences() local 1869 errorCode = ZSTDv01_decodeSeqHeaders(&nbSeq, &dumps, &dumpsLength, in ZSTD_decompressSequences() 1890 for ( ; (FSE_reloadDStream(&(seqState.DStream)) <= FSE_DStream_completed) && (nbSeq>0) ; ) in ZSTD_decompressSequences() 1893 nbSeq--; in ZSTD_decompressSequences() 1902 …if (nbSeq<0) return ERROR(corruption_detected); /* requested too many sequences : data is corrup… in ZSTD_decompressSequences()
|
H A D | zstd_v05.c | 2997 static size_t ZSTDv05_decodeSeqHeaders(int* nbSeq, const BYTE** dumpsPtr, size_t* dumpsLengthPtr, in ZSTDv05_decodeSeqHeaders() argument 3013 *nbSeq = *ip++; in ZSTDv05_decodeSeqHeaders() 3014 if (*nbSeq==0) return 1; in ZSTDv05_decodeSeqHeaders() 3015 if (*nbSeq >= 128) { in ZSTDv05_decodeSeqHeaders() 3017 *nbSeq = ((nbSeq[0]-128)<<8) + *ip++; in ZSTDv05_decodeSeqHeaders() 3315 int nbSeq=0; in ZSTDv05_decompressSequences() local 3325 errorCode = ZSTDv05_decodeSeqHeaders(&nbSeq, &dumps, &dumpsLength, in ZSTDv05_decompressSequences() 3332 if (nbSeq) { in ZSTDv05_decompressSequences() 3347 … for ( ; (BITv05_reloadDStream(&(seqState.DStream)) <= BITv05_DStream_completed) && nbSeq ; ) { in ZSTDv05_decompressSequences() 3349 nbSeq--; in ZSTDv05_decompressSequences() [all …]
|
H A D | zstd_v03.c | 2561 static size_t ZSTD_decodeSeqHeaders(int* nbSeq, const BYTE** dumpsPtr, size_t* dumpsLengthPtr, in ZSTD_decodeSeqHeaders() argument 2576 *nbSeq = MEM_readLE16(ip); ip+=2; in ZSTD_decodeSeqHeaders() 2827 int nbSeq; in ZSTD_decompressSequences() local 2835 errorCode = ZSTD_decodeSeqHeaders(&nbSeq, &dumps, &dumpsLength, in ZSTD_decompressSequences() 2856 for ( ; (BIT_reloadDStream(&(seqState.DStream)) <= BIT_DStream_completed) && (nbSeq>0) ; ) in ZSTD_decompressSequences() 2859 nbSeq--; in ZSTD_decompressSequences() 2868 …if (nbSeq<0) return ERROR(corruption_detected); /* requested too many sequences : data is corrup… in ZSTD_decompressSequences()
|
H A D | zstd_v02.c | 2920 static size_t ZSTD_decodeSeqHeaders(int* nbSeq, const BYTE** dumpsPtr, size_t* dumpsLengthPtr, in ZSTD_decodeSeqHeaders() argument 2935 *nbSeq = MEM_readLE16(ip); ip+=2; in ZSTD_decodeSeqHeaders() 3186 int nbSeq; in ZSTD_decompressSequences() local 3194 errorCode = ZSTD_decodeSeqHeaders(&nbSeq, &dumps, &dumpsLength, in ZSTD_decompressSequences() 3215 for ( ; (BIT_reloadDStream(&(seqState.DStream)) <= BIT_DStream_completed) && (nbSeq>0) ; ) in ZSTD_decompressSequences() 3218 nbSeq--; in ZSTD_decompressSequences() 3227 …if (nbSeq<0) return ERROR(corruption_detected); /* requested too many sequences : data is corrup… in ZSTD_decompressSequences()
|
H A D | zstd_v04.c | 2687 static size_t ZSTD_decodeSeqHeaders(int* nbSeq, const BYTE** dumpsPtr, size_t* dumpsLengthPtr, in ZSTD_decodeSeqHeaders() argument 2702 *nbSeq = MEM_readLE16(ip); ip+=2; in ZSTD_decodeSeqHeaders() 2963 int nbSeq; in ZSTD_decompressSequences() local 2973 errorCode = ZSTD_decodeSeqHeaders(&nbSeq, &dumps, &dumpsLength, in ZSTD_decompressSequences() 2995 for ( ; (BIT_reloadDStream(&(seqState.DStream)) <= BIT_DStream_completed) && nbSeq ; ) in ZSTD_decompressSequences() 2998 nbSeq--; in ZSTD_decompressSequences()
|
/freebsd/sys/contrib/zstd/lib/dictBuilder/ |
H A D | zdict.c | 665 { U32 const nbSeq = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); in ZDICT_countEStats() local 670 for (u=0; u<nbSeq; u++) offsetcodeCount[codePtr[u]]++; in ZDICT_countEStats() 675 for (u=0; u<nbSeq; u++) matchlengthCount[codePtr[u]]++; in ZDICT_countEStats() 680 for (u=0; u<nbSeq; u++) litlengthCount[codePtr[u]]++; in ZDICT_countEStats() 683 if (nbSeq >= 2) { /* rep offsets */ in ZDICT_countEStats()
|