/freebsd/sys/contrib/zstd/lib/compress/ |
H A D | zstd_compress_sequences.c | 57 static unsigned ZSTD_useLowProbCount(size_t const nbSeq) in ZSTD_useLowProbCount() argument 63 return nbSeq >= 2048; in ZSTD_useLowProbCount() 71 size_t const nbSeq, unsigned const FSELog) in ZSTD_NCountCost() argument 75 const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max); in ZSTD_NCountCost() 76 …RWARD_IF_ERROR(FSE_normalizeCount(norm, tableLog, count, nbSeq, max, ZSTD_useLowProbCount(nbSeq)),… in ZSTD_NCountCost() 159 size_t const mostFrequent, size_t nbSeq, unsigned const FSELog, in ZSTD_selectEncodingType() argument 166 if (mostFrequent == nbSeq) { in ZSTD_selectEncodingType() 168 if (isDefaultAllowed && nbSeq <= 2) { in ZSTD_selectEncodingType() 188 && (nbSeq < staticFse_nbSeq_max) ) { in ZSTD_selectEncodingType() 192 if ( (nbSeq < dynamicFse_nbSeq_min) in ZSTD_selectEncodingType() [all …]
|
H A D | zstd_compress_superblock.c | 129 …ompressedSize(seqStore_t const* seqStore, const seqDef* sequences, size_t nbSeq, size_t litSize, i… in ZSTD_seqDecompressedSize() argument 131 const seqDef* const send = sequences + nbSeq; in ZSTD_seqDecompressedSize() 161 const seqDef* sequences, size_t nbSeq, in ZSTD_compressSubBlock_sequences() argument 173 …compressSubBlock_sequences (nbSeq=%zu, writeEntropy=%d, longOffsets=%d)", nbSeq, writeEntropy, lon… in ZSTD_compressSubBlock_sequences() 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() 184 op[0]=0xFF, MEM_writeLE16(op+1, (U16)(nbSeq - LONGNBSEQ)), op+=3; in ZSTD_compressSubBlock_sequences() 185 if (nbSeq==0) { in ZSTD_compressSubBlock_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 | 2394 U32 const nbSeq = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); in ZSTD_seqToCodes() local 2396 assert(nbSeq <= seqStorePtr->maxNbSeq); in ZSTD_seqToCodes() 2397 for (u=0; u<nbSeq; u++) { in ZSTD_seqToCodes() 2451 ZSTD_buildSequencesStatistics(seqStore_t* seqStorePtr, size_t nbSeq, in ZSTD_buildSequencesStatistics() argument 2471 assert(nbSeq != 0); /* ZSTD_selectEncodingType() divides by nbSeq */ in ZSTD_buildSequencesStatistics() 2474 …size_t const mostFrequent = HIST_countFast_wksp(countWorkspace, &max, llCodeTable, nbSeq, entropyW… in ZSTD_buildSequencesStatistics() 2478 countWorkspace, max, mostFrequent, nbSeq, in ZSTD_buildSequencesStatistics() 2487 countWorkspace, max, llCodeTable, nbSeq, in ZSTD_buildSequencesStatistics() 2505 … countWorkspace, &max, ofCodeTable, nbSeq, entropyWorkspace, entropyWkspSize); /* can't fail */ in ZSTD_buildSequencesStatistics() 2511 countWorkspace, max, mostFrequent, nbSeq, in ZSTD_buildSequencesStatistics() [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 | 58 size_t const nbSeq, unsigned const FSELog) in ZSTD_NCountCost() argument 62 const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max); in ZSTD_NCountCost() 63 FORWARD_IF_ERROR(FSE_normalizeCount(norm, tableLog, count, nbSeq, max), ""); in ZSTD_NCountCost() 144 size_t const mostFrequent, size_t nbSeq, unsigned const FSELog, in ZSTD_selectEncodingType() argument 151 if (mostFrequent == nbSeq) { in ZSTD_selectEncodingType() 153 if (isDefaultAllowed && nbSeq <= 2) { in ZSTD_selectEncodingType() 173 && (nbSeq < staticFse_nbSeq_max) ) { in ZSTD_selectEncodingType() 177 if ( (nbSeq < dynamicFse_nbSeq_min) in ZSTD_selectEncodingType() 178 || (mostFrequent < (nbSeq >> (defaultNormLog-1))) ) { in ZSTD_selectEncodingType() 193 size_t const NCountCost = ZSTD_NCountCost(count, max, nbSeq, FSELog); in ZSTD_selectEncodingType() [all …]
|
H A D | zstd_compress_superblock.c | 184 size_t const nbSeq = seqStorePtr->sequences - seqStorePtr->sequencesStart; in ZSTD_buildSuperBlockEntropy_sequences() local 190 DEBUGLOG(5, "ZSTD_buildSuperBlockEntropy_sequences (nbSeq=%zu)", nbSeq); in ZSTD_buildSuperBlockEntropy_sequences() 199 …size_t const mostFrequent = HIST_countFast_wksp(countWksp, &max, llCodeTable, nbSeq, workspace, wk… in ZSTD_buildSuperBlockEntropy_sequences() 203 countWksp, max, mostFrequent, nbSeq, in ZSTD_buildSuperBlockEntropy_sequences() 210 … countWksp, max, llCodeTable, nbSeq, LL_defaultNorm, LL_defaultNormLog, MaxLL, in ZSTD_buildSuperBlockEntropy_sequences() 222 …size_t const mostFrequent = HIST_countFast_wksp(countWksp, &max, ofCodeTable, nbSeq, workspace, wk… in ZSTD_buildSuperBlockEntropy_sequences() 228 countWksp, max, mostFrequent, nbSeq, in ZSTD_buildSuperBlockEntropy_sequences() 234 … countWksp, max, ofCodeTable, nbSeq, OF_defaultNorm, OF_defaultNormLog, DefaultMaxOff, in ZSTD_buildSuperBlockEntropy_sequences() 246 …size_t const mostFrequent = HIST_countFast_wksp(countWksp, &max, mlCodeTable, nbSeq, workspace, wk… in ZSTD_buildSuperBlockEntropy_sequences() 250 countWksp, max, mostFrequent, nbSeq, in ZSTD_buildSuperBlockEntropy_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 | 1935 U32 const nbSeq = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); in ZSTD_seqToCodes() local 1937 assert(nbSeq <= seqStorePtr->maxNbSeq); in ZSTD_seqToCodes() 1938 for (u=0; u<nbSeq; u++) { in ZSTD_seqToCodes() 1986 size_t const nbSeq = (size_t)(seqStorePtr->sequences - seqStorePtr->sequencesStart); in ZSTD_compressSequences_internal() local 1990 DEBUGLOG(5, "ZSTD_compressSequences_internal (nbSeq=%zu)", nbSeq); in ZSTD_compressSequences_internal() 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() [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 | 438 int ddictIsCold, int nbSeq) in ZSTD_buildSeqTable() argument 458 if (ddictIsCold && (nbSeq > 24 /* heuristic */)) { in ZSTD_buildSeqTable() 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() 502 nbSeq = MEM_readLE16(ip) + LONGNBSEQ, ip+=2; in ZSTD_decodeSeqHeaders() 505 nbSeq = ((nbSeq-0x80)<<8) + *ip++; in ZSTD_decodeSeqHeaders() 508 *nbSeqPtr = nbSeq; in ZSTD_decodeSeqHeaders() [all …]
|
/freebsd/sys/contrib/zstd/lib/decompress/ |
H A D | zstd_decompress_block.c | 610 int ddictIsCold, int nbSeq, U32* wksp, size_t wkspSize, in ZSTD_buildSeqTable() argument 631 if (ddictIsCold && (nbSeq > 24 /* heuristic */)) { in ZSTD_buildSeqTable() 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() 675 nbSeq = MEM_readLE16(ip) + LONGNBSEQ; in ZSTD_decodeSeqHeaders() 679 nbSeq = ((nbSeq-0x80)<<8) + *ip++; in ZSTD_decodeSeqHeaders() 682 *nbSeqPtr = nbSeq; in ZSTD_decodeSeqHeaders() [all …]
|
/freebsd/sys/contrib/zstd/lib/legacy/ |
H A D | zstd_v06.c | 613 void ZSTDv06_seqToCodes(const seqStore_t* seqStorePtr, size_t const nbSeq); 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 3458 …{ size_t const seqHSize = ZSTDv06_decodeSeqHeaders(&nbSeq, DTableLL, DTableML, DTableOffb, dctx-… in ZSTDv06_decompressSequences() [all …]
|
H A D | zstd_v07.c | 2847 void ZSTDv07_seqToCodes(const seqStore_t* seqStorePtr, size_t const nbSeq); 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 3685 …{ size_t const seqHSize = ZSTDv07_decodeSeqHeaders(&nbSeq, DTableLL, DTableML, DTableOffb, dctx-… 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()
|