| /freebsd/sys/contrib/openzfs/module/zstd/lib/compress/ |
| H A D | zstd_compress_sequences.c | 58 static unsigned ZSTD_useLowProbCount(size_t const nbSeq) in ZSTD_useLowProbCount() argument 64 return nbSeq >= 2048; in ZSTD_useLowProbCount() 72 size_t const nbSeq, unsigned const FSELog) in ZSTD_NCountCost() argument 76 const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max); in ZSTD_NCountCost() 77 …RWARD_IF_ERROR(FSE_normalizeCount(norm, tableLog, count, nbSeq, max, ZSTD_useLowProbCount(nbSeq)),… in ZSTD_NCountCost() 160 size_t const mostFrequent, size_t nbSeq, unsigned const FSELog, in ZSTD_selectEncodingType() argument 167 if (mostFrequent == nbSeq) { in ZSTD_selectEncodingType() 169 if (isDefaultAllowed && nbSeq <= 2) { in ZSTD_selectEncodingType() 189 && (nbSeq < staticFse_nbSeq_max) ) { in ZSTD_selectEncodingType() 193 if ( (nbSeq < dynamicFse_nbSeq_min) in ZSTD_selectEncodingType() [all …]
|
| H A D | zstd_compress_superblock.c | 166 const SeqDef* sequences, size_t nbSeq, in ZSTD_compressSubBlock_sequences() argument 178 …compressSubBlock_sequences (nbSeq=%zu, writeEntropy=%d, longOffsets=%d)", nbSeq, writeEntropy, lon… in ZSTD_compressSubBlock_sequences() 184 if (nbSeq < 128) in ZSTD_compressSubBlock_sequences() 185 *op++ = (BYTE)nbSeq; in ZSTD_compressSubBlock_sequences() 186 else if (nbSeq < LONGNBSEQ) in ZSTD_compressSubBlock_sequences() 187 op[0] = (BYTE)((nbSeq>>8) + 0x80), op[1] = (BYTE)nbSeq, op+=2; in ZSTD_compressSubBlock_sequences() 189 op[0]=0xFF, MEM_writeLE16(op+1, (U16)(nbSeq - LONGNBSEQ)), op+=3; in ZSTD_compressSubBlock_sequences() 190 if (nbSeq==0) { in ZSTD_compressSubBlock_sequences() 217 sequences, nbSeq, in ZSTD_compressSubBlock_sequences() 266 const SeqDef* sequences, size_t nbSeq, in ZSTD_compressSubBlock() argument [all …]
|
| H A D | zstd_compress_sequences.h | 27 size_t const mostFrequent, size_t nbSeq, unsigned const FSELog, 37 const BYTE* codeTable, size_t nbSeq, 47 SeqDef const* sequences, size_t nbSeq, int longOffsets, int bmi2);
|
| H A D | zstd_compress.c | 2700 U32 const nbSeq = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); in ZSTD_seqToCodes() local 2703 assert(nbSeq <= seqStorePtr->maxNbSeq); in ZSTD_seqToCodes() 2704 for (u=0; u<nbSeq; u++) { in ZSTD_seqToCodes() 2765 const SeqStore_t* seqStorePtr, size_t nbSeq, in ZSTD_buildSequencesStatistics() argument 2786 assert(nbSeq != 0); /* ZSTD_selectEncodingType() divides by nbSeq */ in ZSTD_buildSequencesStatistics() 2789 …size_t const mostFrequent = HIST_countFast_wksp(countWorkspace, &max, llCodeTable, nbSeq, entropyW… in ZSTD_buildSequencesStatistics() 2793 countWorkspace, max, mostFrequent, nbSeq, in ZSTD_buildSequencesStatistics() 2802 countWorkspace, max, llCodeTable, nbSeq, in ZSTD_buildSequencesStatistics() 2820 … countWorkspace, &max, ofCodeTable, nbSeq, entropyWorkspace, entropyWkspSize); /* can't fail */ in ZSTD_buildSequencesStatistics() 2826 countWorkspace, max, mostFrequent, nbSeq, in ZSTD_buildSequencesStatistics() [all …]
|
| H A D | zstd_compress_internal.h | 1602 void ZSTD_referenceExternalSequences(ZSTD_CCtx* cctx, rawSeq* seq, size_t nbSeq);
|
| /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 | 165 const SeqDef* sequences, size_t nbSeq, in ZSTD_compressSubBlock_sequences() argument 177 …compressSubBlock_sequences (nbSeq=%zu, writeEntropy=%d, longOffsets=%d)", nbSeq, writeEntropy, lon… in ZSTD_compressSubBlock_sequences() 183 if (nbSeq < 128) in ZSTD_compressSubBlock_sequences() 184 *op++ = (BYTE)nbSeq; in ZSTD_compressSubBlock_sequences() 185 else if (nbSeq < LONGNBSEQ) in ZSTD_compressSubBlock_sequences() 186 op[0] = (BYTE)((nbSeq>>8) + 0x80), op[1] = (BYTE)nbSeq, op+=2; in ZSTD_compressSubBlock_sequences() 188 op[0]=0xFF, MEM_writeLE16(op+1, (U16)(nbSeq - LONGNBSEQ)), op+=3; in ZSTD_compressSubBlock_sequences() 189 if (nbSeq==0) { in ZSTD_compressSubBlock_sequences() 216 sequences, nbSeq, in ZSTD_compressSubBlock_sequences() 265 const SeqDef* sequences, size_t nbSeq, in ZSTD_compressSubBlock() argument [all …]
|
| H A D | zstd_compress_sequences.h | 26 size_t const mostFrequent, size_t nbSeq, unsigned const FSELog, 36 const BYTE* codeTable, size_t nbSeq, 46 SeqDef const* sequences, size_t nbSeq, int longOffsets, int bmi2);
|
| H A D | zstd_compress.c | 2699 U32 const nbSeq = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); in ZSTD_seqToCodes() local 2702 assert(nbSeq <= seqStorePtr->maxNbSeq); in ZSTD_seqToCodes() 2703 for (u=0; u<nbSeq; u++) { in ZSTD_seqToCodes() 2764 const SeqStore_t* seqStorePtr, size_t nbSeq, in ZSTD_buildSequencesStatistics() argument 2785 assert(nbSeq != 0); /* ZSTD_selectEncodingType() divides by nbSeq */ in ZSTD_buildSequencesStatistics() 2788 …size_t const mostFrequent = HIST_countFast_wksp(countWorkspace, &max, llCodeTable, nbSeq, entropyW… in ZSTD_buildSequencesStatistics() 2792 countWorkspace, max, mostFrequent, nbSeq, in ZSTD_buildSequencesStatistics() 2801 countWorkspace, max, llCodeTable, nbSeq, in ZSTD_buildSequencesStatistics() 2819 … countWorkspace, &max, ofCodeTable, nbSeq, entropyWorkspace, entropyWkspSize); /* can't fail */ in ZSTD_buildSequencesStatistics() 2825 countWorkspace, max, mostFrequent, nbSeq, in ZSTD_buildSequencesStatistics() [all …]
|
| H A D | zstdmt_compress.c | 329 static void ZSTDMT_setNbSeq(ZSTDMT_seqPool* const seqPool, size_t const nbSeq) in ZSTDMT_setNbSeq() argument 331 ZSTDMT_setBufferSize(seqPool, nbSeq * sizeof(rawSeq)); in ZSTDMT_setNbSeq()
|
| H A D | zstd_compress_internal.h | 1601 void 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 | 653 int ddictIsCold, int nbSeq, U32* wksp, size_t wkspSize, in ZSTD_buildSeqTable() argument 674 if (ddictIsCold && (nbSeq > 24 /* heuristic */)) { in ZSTD_buildSeqTable() 702 int nbSeq; in ZSTD_decodeSeqHeaders() local 709 nbSeq = *ip++; in ZSTD_decodeSeqHeaders() 710 if (nbSeq > 0x7F) { in ZSTD_decodeSeqHeaders() 711 if (nbSeq == 0xFF) { in ZSTD_decodeSeqHeaders() 713 nbSeq = MEM_readLE16(ip) + LONGNBSEQ; in ZSTD_decodeSeqHeaders() 717 nbSeq = ((nbSeq-0x80)<<8) + *ip++; in ZSTD_decodeSeqHeaders() 720 *nbSeqPtr = nbSeq; in ZSTD_decodeSeqHeaders() 722 if (nbSeq == 0) { in ZSTD_decodeSeqHeaders() [all …]
|
| /freebsd/sys/contrib/zstd/lib/decompress/ |
| H A D | zstd_decompress_block.c | 652 int ddictIsCold, int nbSeq, U32* wksp, size_t wkspSize, in ZSTD_buildSeqTable() argument 673 if (ddictIsCold && (nbSeq > 24 /* heuristic */)) { in ZSTD_buildSeqTable() 701 int nbSeq; in ZSTD_decodeSeqHeaders() local 708 nbSeq = *ip++; in ZSTD_decodeSeqHeaders() 709 if (nbSeq > 0x7F) { in ZSTD_decodeSeqHeaders() 710 if (nbSeq == 0xFF) { in ZSTD_decodeSeqHeaders() 712 nbSeq = MEM_readLE16(ip) + LONGNBSEQ; in ZSTD_decodeSeqHeaders() 716 nbSeq = ((nbSeq-0x80)<<8) + *ip++; in ZSTD_decodeSeqHeaders() 719 *nbSeqPtr = nbSeq; in ZSTD_decodeSeqHeaders() 721 if (nbSeq == 0) { in ZSTD_decodeSeqHeaders() [all …]
|
| /freebsd/sys/contrib/zstd/lib/legacy/ |
| H A D | zstd_v06.c | 557 void ZSTDv06_seqToCodes(const SeqStore_t* seqStorePtr, size_t const nbSeq); 3174 { int nbSeq = *ip++; in ZSTDv06_decodeSeqHeaders() local 3175 if (!nbSeq) { *nbSeqPtr=0; return 1; } in ZSTDv06_decodeSeqHeaders() 3176 if (nbSeq > 0x7F) { in ZSTDv06_decodeSeqHeaders() 3177 if (nbSeq == 0xFF) { in ZSTDv06_decodeSeqHeaders() 3179 nbSeq = MEM_readLE16(ip) + LONGNBSEQ, ip+=2; in ZSTDv06_decodeSeqHeaders() 3182 nbSeq = ((nbSeq-0x80)<<8) + *ip++; in ZSTDv06_decodeSeqHeaders() 3185 *nbSeqPtr = nbSeq; in ZSTDv06_decodeSeqHeaders() 3405 int nbSeq; in ZSTDv06_decompressSequences() local 3408 …{ size_t const seqHSize = ZSTDv06_decodeSeqHeaders(&nbSeq, DTableLL, DTableML, DTableOffb, dctx-… in ZSTDv06_decompressSequences() [all …]
|
| H A D | zstd_v07.c | 2792 void ZSTDv07_seqToCodes(const SeqStore_t* seqStorePtr, size_t const nbSeq); 3405 { int nbSeq = *ip++; in ZSTDv07_decodeSeqHeaders() local 3406 if (!nbSeq) { *nbSeqPtr=0; return 1; } in ZSTDv07_decodeSeqHeaders() 3407 if (nbSeq > 0x7F) { in ZSTDv07_decodeSeqHeaders() 3408 if (nbSeq == 0xFF) { in ZSTDv07_decodeSeqHeaders() 3410 nbSeq = MEM_readLE16(ip) + LONGNBSEQ, ip+=2; in ZSTDv07_decodeSeqHeaders() 3413 nbSeq = ((nbSeq-0x80)<<8) + *ip++; in ZSTDv07_decodeSeqHeaders() 3416 *nbSeqPtr = nbSeq; in ZSTDv07_decodeSeqHeaders() 3630 int nbSeq; in ZSTDv07_decompressSequences() local 3633 …{ size_t const seqHSize = ZSTDv07_decodeSeqHeaders(&nbSeq, DTableLL, DTableML, DTableOffb, dctx-… in ZSTDv07_decompressSequences() [all …]
|
| H A D | zstd_v01.c | 1534 static size_t ZSTDv01_decodeSeqHeaders(int* nbSeq, const BYTE** dumpsPtr, size_t* dumpsLengthPtr, in ZSTDv01_decodeSeqHeaders() argument 1549 *nbSeq = ZSTD_readLE16(ip); ip+=2; in ZSTDv01_decodeSeqHeaders() 1829 int nbSeq; in ZSTD_decompressSequences() local 1837 errorCode = ZSTDv01_decodeSeqHeaders(&nbSeq, &dumps, &dumpsLength, in ZSTD_decompressSequences() 1858 for ( ; (FSE_reloadDStream(&(seqState.DStream)) <= FSE_DStream_completed) && (nbSeq>0) ; ) in ZSTD_decompressSequences() 1861 nbSeq--; in ZSTD_decompressSequences() 1870 …if (nbSeq<0) return ERROR(corruption_detected); /* requested too many sequences : data is corrup… in ZSTD_decompressSequences()
|
| H A D | zstd_v05.c | 2945 static size_t ZSTDv05_decodeSeqHeaders(int* nbSeq, const BYTE** dumpsPtr, size_t* dumpsLengthPtr, in ZSTDv05_decodeSeqHeaders() argument 2961 *nbSeq = *ip++; in ZSTDv05_decodeSeqHeaders() 2962 if (*nbSeq==0) return 1; in ZSTDv05_decodeSeqHeaders() 2963 if (*nbSeq >= 128) { in ZSTDv05_decodeSeqHeaders() 2965 *nbSeq = ((nbSeq[0]-128)<<8) + *ip++; in ZSTDv05_decodeSeqHeaders() 3269 int nbSeq=0; in ZSTDv05_decompressSequences() local 3279 errorCode = ZSTDv05_decodeSeqHeaders(&nbSeq, &dumps, &dumpsLength, in ZSTDv05_decompressSequences() 3286 if (nbSeq) { in ZSTDv05_decompressSequences() 3301 … for ( ; (BITv05_reloadDStream(&(seqState.DStream)) <= BITv05_DStream_completed) && nbSeq ; ) { in ZSTDv05_decompressSequences() 3303 nbSeq--; in ZSTDv05_decompressSequences() [all …]
|
| H A D | zstd_v03.c | 2499 static size_t ZSTD_decodeSeqHeaders(int* nbSeq, const BYTE** dumpsPtr, size_t* dumpsLengthPtr, in ZSTD_decodeSeqHeaders() argument 2514 *nbSeq = MEM_readLE16(ip); ip+=2; in ZSTD_decodeSeqHeaders() 2771 int nbSeq; in ZSTD_decompressSequences() local 2779 errorCode = ZSTD_decodeSeqHeaders(&nbSeq, &dumps, &dumpsLength, in ZSTD_decompressSequences() 2800 for ( ; (BIT_reloadDStream(&(seqState.DStream)) <= BIT_DStream_completed) && (nbSeq>0) ; ) in ZSTD_decompressSequences() 2803 nbSeq--; in ZSTD_decompressSequences() 2812 …if (nbSeq<0) return ERROR(corruption_detected); /* requested too many sequences : data is corrup… in ZSTD_decompressSequences()
|
| H A D | zstd_v02.c | 2859 static size_t ZSTD_decodeSeqHeaders(int* nbSeq, const BYTE** dumpsPtr, size_t* dumpsLengthPtr, in ZSTD_decodeSeqHeaders() argument 2874 *nbSeq = MEM_readLE16(ip); ip+=2; in ZSTD_decodeSeqHeaders() 3132 int nbSeq; in ZSTD_decompressSequences() local 3140 errorCode = ZSTD_decodeSeqHeaders(&nbSeq, &dumps, &dumpsLength, in ZSTD_decompressSequences() 3161 for ( ; (BIT_reloadDStream(&(seqState.DStream)) <= BIT_DStream_completed) && (nbSeq>0) ; ) in ZSTD_decompressSequences() 3164 nbSeq--; in ZSTD_decompressSequences() 3173 …if (nbSeq<0) return ERROR(corruption_detected); /* requested too many sequences : data is corrup… in ZSTD_decompressSequences()
|
| H A D | zstd_v04.c | 2631 static size_t ZSTD_decodeSeqHeaders(int* nbSeq, const BYTE** dumpsPtr, size_t* dumpsLengthPtr, in ZSTD_decodeSeqHeaders() argument 2646 *nbSeq = MEM_readLE16(ip); ip+=2; in ZSTD_decodeSeqHeaders() 2913 int nbSeq; in ZSTD_decompressSequences() local 2923 errorCode = ZSTD_decodeSeqHeaders(&nbSeq, &dumps, &dumpsLength, in ZSTD_decompressSequences() 2945 for ( ; (BIT_reloadDStream(&(seqState.DStream)) <= BIT_DStream_completed) && nbSeq ; ) in ZSTD_decompressSequences() 2948 nbSeq--; in ZSTD_decompressSequences()
|
| /freebsd/sys/contrib/zstd/lib/dictBuilder/ |
| H A D | zdict.c | 592 { U32 const nbSeq = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart); in ZDICT_countEStats() local 597 for (u=0; u<nbSeq; u++) offsetcodeCount[codePtr[u]]++; in ZDICT_countEStats() 602 for (u=0; u<nbSeq; u++) matchlengthCount[codePtr[u]]++; in ZDICT_countEStats() 607 for (u=0; u<nbSeq; u++) litlengthCount[codePtr[u]]++; in ZDICT_countEStats() 610 if (nbSeq >= 2) { /* rep offsets */ in ZDICT_countEStats()
|