15#ifndef ZSTD_COMPRESS_H
16#define ZSTD_COMPRESS_H
23#ifdef ZSTD_MULTITHREAD
24# include "zstdmt_compress.h"
27#if defined (__cplusplus)
35#define kSearchStrength 8
36#define HASH_READ_SIZE 8
37#define ZSTD_DUBT_UNSORTED_MARK 1
62 ZSTD_dictContentType_e dictContentType;
67 U32 CTable[HUF_CTABLE_SIZE_U32(255)];
68 HUF_repeat repeatMode;
75 FSE_repeat offcode_repeatMode;
76 FSE_repeat matchlength_repeatMode;
77 FSE_repeat litlength_repeatMode;
103 unsigned* litLengthFreq;
104 unsigned* matchLengthFreq;
105 unsigned* offCodeFreq;
114 U32 litLengthSumBasePrice;
115 U32 matchLengthSumBasePrice;
119 ZSTD_literalCompressionMode_e literalCompressionMode;
198 int collectSequences;
199 ZSTD_Sequence* seqStart;
282#ifdef ZSTD_MULTITHREAD
294 void const*
src,
size_t srcSize);
300 static const BYTE LL_Code[64] = { 0, 1, 2, 3, 4, 5, 6, 7,
301 8, 9, 10, 11, 12, 13, 14, 15,
302 16, 16, 17, 17, 18, 18, 19, 19,
303 20, 20, 20, 20, 21, 21, 21, 21,
304 22, 22, 22, 22, 22, 22, 22, 22,
305 23, 23, 23, 23, 23, 23, 23, 23,
306 24, 24, 24, 24, 24, 24, 24, 24,
307 24, 24, 24, 24, 24, 24, 24, 24 };
308 static const U32 LL_deltaCode = 19;
309 return (litLength > 63) ?
ZSTD_highbit32(litLength) + LL_deltaCode : LL_Code[litLength];
317 static const BYTE ML_Code[128] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
318 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
319 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 36, 36, 37, 37, 37, 37,
320 38, 38, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39,
321 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
322 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
323 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42,
324 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42 };
325 static const U32 ML_deltaCode = 36;
326 return (mlBase > 127) ?
ZSTD_highbit32(mlBase) + ML_deltaCode : ML_Code[mlBase];
337 newReps.
rep[2] = rep[1];
338 newReps.
rep[1] = rep[0];
343 U32 const currentOffset = (repCode==
ZSTD_REP_NUM) ? (rep[0] - 1) : rep[repCode];
344 newReps.
rep[2] = (repCode >= 2) ? rep[1] : rep[2];
345 newReps.
rep[1] = rep[0];
346 newReps.
rep[0] = currentOffset;
348 memcpy(&newReps, rep,
sizeof(newReps));
371 U32 const cBlockHeader24 = lastBlock + (((
U32)
bt_raw)<<1) + (
U32)(srcSize << 3);
373 dstSize_tooSmall,
"dst buf too small for uncompressed block");
382 U32 const cBlockHeader = lastBlock + (((
U32)
bt_rle)<<1) + (
U32)(srcSize << 3);
399 return (srcSize >> minlog) + 2;
404 switch (cctxParams->literalCompressionMode) {
405 case ZSTD_lcm_huffman:
407 case ZSTD_lcm_uncompressed:
413 return (cctxParams->cParams.strategy ==
ZSTD_fast) && (cctxParams->cParams.targetLength > 0);
424 if (
ip <= ilimit_w) {
429 while (
ip < iend) *
op++ = *
ip++;
442 BYTE const*
const litEnd = literals + litLength;
443#if defined(DEBUGLEVEL) && (DEBUGLEVEL >= 6)
445 if (g_start==
NULL) g_start = (
const BYTE*)literals;
447 DEBUGLOG(6,
"Cpos%7u :%3u literals, match%4u bytes at offCode%7u",
454 assert(seqStorePtr->
lit + litLength <= seqStorePtr->litStart + seqStorePtr->
maxNbLit);
455 assert(literals + litLength <= litLimit);
456 if (litEnd <= litLimit_w) {
462 if (litLength > 16) {
468 seqStorePtr->
lit += litLength;
471 if (litLength>0xFFFF) {
500# if defined(_MSC_VER) && defined(_WIN64)
503# elif defined(__GNUC__) && (__GNUC__ >= 4)
504 return (__builtin_ctzll((
U64)
val) >> 3);
506 static const int DeBruijnBytePos[64] = { 0, 0, 0, 0, 0, 1, 1, 2,
507 0, 3, 1, 3, 1, 4, 2, 7,
508 0, 2, 3, 6, 1, 5, 3, 5,
509 1, 3, 4, 4, 2, 5, 6, 7,
510 7, 0, 1, 2, 3, 3, 4, 6,
511 2, 6, 5, 5, 3, 4, 5, 6,
512 7, 1, 2, 4, 6, 4, 4, 5,
513 7, 2, 6, 5, 7, 6, 7, 7 };
514 return DeBruijnBytePos[((
U64)((
val & -(
long long)
val) * 0x0218A392CDABBD3FULL)) >> 58];
517# if defined(_MSC_VER)
520# elif defined(__GNUC__) && (__GNUC__ >= 3)
521 return (__builtin_ctz((
U32)
val) >> 3);
523 static const int DeBruijnBytePos[32] = { 0, 0, 3, 0, 3, 1, 3, 0,
524 3, 2, 2, 1, 3, 2, 0, 1,
525 3, 3, 1, 2, 2, 2, 2, 0,
526 3, 1, 2, 0, 1, 0, 1, 1 };
527 return DeBruijnBytePos[((
U32)((
val & -(
S32)
val) * 0x077CB531U)) >> 27];
532# if defined(_MSC_VER) && defined(_WIN64)
534 return _BitScanReverse64( &
r,
val ) ? (
unsigned)(
r >> 3) : 0;
535# elif defined(__GNUC__) && (__GNUC__ >= 4)
536 return (__builtin_clzll(
val) >> 3);
539 const unsigned n32 =
sizeof(
size_t)*4;
540 if (!(
val>>n32)) {
r=4; }
else {
r=0;
val>>=n32; }
541 if (!(
val>>16)) {
r+=2;
val>>=8; }
else {
val>>=24; }
546# if defined(_MSC_VER)
549# elif defined(__GNUC__) && (__GNUC__ >= 3)
550 return (__builtin_clz((
U32)
val) >> 3);
553 if (!(
val>>16)) {
r=2;
val>>=8; }
else {
r=0;
val>>=24; }
563 const BYTE*
const pStart = pIn;
564 const BYTE*
const pInLoopLimit = pInLimit - (
sizeof(
size_t)-1);
566 if (pIn < pInLoopLimit) {
570 while (pIn < pInLoopLimit) {
572 if (!diff) { pIn+=
sizeof(
size_t); pMatch+=
sizeof(
size_t);
continue; }
574 return (
size_t)(pIn - pStart);
578 if ((pIn<pInLimit) && (*pMatch == *pIn)) pIn++;
579 return (
size_t)(pIn - pStart);
592 if (
match + matchLength != mEnd)
return matchLength;
593 DEBUGLOG(7,
"ZSTD_count_2segments: found a 2-parts match (current length==%zu)", matchLength);
594 DEBUGLOG(7,
"distance from match beginning to end dictionary = %zi", mEnd -
match);
595 DEBUGLOG(7,
"distance from current pos to end buffer = %zi", iEnd -
ip);
596 DEBUGLOG(7,
"next byte : ip==%02X, istart==%02X",
ip[matchLength], *
iStart);
656#define ZSTD_ROLL_HASH_CHAR_OFFSET 10
703#if (ZSTD_WINDOWLOG_MAX_64 > 31)
704# error "ZSTD_WINDOWLOG_MAX is too large : would overflow ZSTD_CURRENT_MAX"
707#define ZSTD_CURRENT_MAX ((3U << 29) + (1U << ZSTD_WINDOWLOG_MAX))
709#define ZSTD_CHUNKSIZE_MAX \
772 U32 maxDist,
void const*
src)
793 U32 const cycleMask = (1U << cycleLog) - 1;
795 U32 const currentCycle0 =
current & cycleMask;
797 U32 const currentCycle1 = currentCycle0 == 0 ? (1U << cycleLog) : currentCycle0;
798 U32 const newCurrent = currentCycle1 + maxDist;
800 assert((maxDist & cycleMask) == 0);
803 assert(correction > 1<<28);
805 window->base += correction;
806 window->dictBase += correction;
807 if (
window->lowLimit <= correction)
window->lowLimit = 1;
808 else window->lowLimit -= correction;
809 if (
window->dictLimit <= correction)
window->dictLimit = 1;
810 else window->dictLimit -= correction;
813 assert(newCurrent >= maxDist);
814 assert(newCurrent - maxDist >= 1);
819 DEBUGLOG(4,
"Correction of 0x%x bytes to lowLimit=0x%x", correction,
849 const void* blockEnd,
851 U32* loadedDictEndPtr,
855 U32 const loadedDictEnd = (loadedDictEndPtr !=
NULL) ? *loadedDictEndPtr : 0;
856 DEBUGLOG(5,
"ZSTD_window_enforceMaxDist: blockEndIdx=%u, maxDist=%u, loadedDictEnd=%u",
857 (
unsigned)blockEndIdx, (
unsigned)maxDist, (
unsigned)loadedDictEnd);
872 if (blockEndIdx > maxDist + loadedDictEnd) {
873 U32 const newLowLimit = blockEndIdx - maxDist;
874 if (
window->lowLimit < newLowLimit)
window->lowLimit = newLowLimit;
876 DEBUGLOG(5,
"Update dictLimit to match lowLimit, from %u to %u",
877 (
unsigned)
window->dictLimit, (
unsigned)
window->lowLimit);
881 if (loadedDictEndPtr) *loadedDictEndPtr = 0;
882 if (dictMatchStatePtr) *dictMatchStatePtr =
NULL;
894 const void* blockEnd,
896 U32* loadedDictEndPtr,
902 U32 const loadedDictEnd = *loadedDictEndPtr;
903 DEBUGLOG(5,
"ZSTD_checkDictValidity: blockEndIdx=%u, maxDist=%u, loadedDictEnd=%u",
904 (
unsigned)blockEndIdx, (
unsigned)maxDist, (
unsigned)loadedDictEnd);
905 assert(blockEndIdx >= loadedDictEnd);
907 if (blockEndIdx > loadedDictEnd + maxDist) {
912 DEBUGLOG(6,
"invalidating dictionary for current block (distance > windowSize)");
913 *loadedDictEndPtr = 0;
914 *dictMatchStatePtr =
NULL;
916 if (*loadedDictEndPtr != 0) {
917 DEBUGLOG(6,
"dictionary considered valid for current block");
938 void const*
src,
size_t srcSize)
951 DEBUGLOG(5,
"Non contiguous blocks, new segment starts at %u",
window->dictLimit);
953 assert(distanceFromBase == (
size_t)(
U32)distanceFromBase);
954 window->dictLimit = (
U32)distanceFromBase;
956 window->base =
ip - distanceFromBase;
967 window->lowLimit = lowLimitMax;
968 DEBUGLOG(5,
"Overlapping extDict and input : new lowLimit = %u",
window->lowLimit);
978 U32 const maxDistance = 1U << windowLog;
980 U32 const withinWindow = (
current - lowestValid > maxDistance) ?
current - maxDistance : lowestValid;
982 U32 const matchLowest = isDictionary ? lowestValid : withinWindow;
991 U32 const maxDistance = 1U << windowLog;
993 U32 const withinWindow = (
current - lowestValid > maxDistance) ?
current - maxDistance : lowestValid;
995 U32 const matchLowest = isDictionary ? lowestValid : withinWindow;
1006 U32 const fp_accuracy = 8;
1007 U32 const fp_multiplier = (1 << fp_accuracy);
1008 U32 const newStat = rawStat + 1;
1010 U32 const BWeight = hb * fp_multiplier;
1011 U32 const FWeight = (newStat << fp_accuracy) >> hb;
1013 assert(hb + fp_accuracy < 31);
1014 return (
double)
weight / fp_multiplier;
1033#if defined (__cplusplus)
1048 short* offcodeNCount,
unsigned* offcodeMaxValue,
1049 const void*
const dict,
size_t dictSize);
1064 const ZSTD_CCtx_params* CCtxParams,
U64 srcSizeHint,
size_t dictSize);
1072 const void* dict,
size_t dictSize,
1074 const ZSTD_CCtx_params*
params,
unsigned long long pledgedSrcSize);
1085 const void* dict,
size_t dictSize,
1086 ZSTD_dictContentType_e dictContentType,
1089 const ZSTD_CCtx_params*
params,
1090 unsigned long long pledgedSrcSize);
1095 void*
dst,
size_t dstCapacity,
1096 const void*
src,
size_t srcSize,
1097 const void* dict,
size_t dictSize,
1098 const ZSTD_CCtx_params*
params);
void mls(int argc, const char *argv[])
static cab_ULONG checksum(const cab_UBYTE *data, cab_UWORD bytes, cab_ULONG csum)
MEM_STATIC U32 MEM_read32(const void *memPtr)
MEM_STATIC U16 MEM_read16(const void *memPtr)
MEM_STATIC size_t MEM_readST(const void *memPtr)
MEM_STATIC unsigned MEM_isLittleEndian(void)
MEM_STATIC unsigned MEM_64bits(void)
MEM_STATIC U64 MEM_readLE64(const void *memPtr)
MEM_STATIC void MEM_writeLE24(void *memPtr, U32 val)
MEM_STATIC U32 MEM_readLE32(const void *memPtr)
__kernel_ptrdiff_t ptrdiff_t
GLdouble GLdouble GLdouble r
GLenum const GLfloat * params
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
unsigned char _BitScanReverse(unsigned long *_Index, unsigned long _Mask)
unsigned char _BitScanForward(unsigned long *_Index, unsigned long _Mask)
static struct msdos_boot_sector bs
#define memcpy(s1, s2, n)
struct task_struct * current
static IHTMLWindow2 * window
static unsigned(__cdecl *hash_bstr)(bstr_t s)
static int sum(int x_, int y_)
ZSTD_frameParameters fParams
ZSTD_compressionParameters cParams
ZSTD_literalCompressionMode_e literalCompressionMode
ZSTD_dictAttachPref_e attachDictPref
ZSTD_CCtx_params appliedParams
ZSTD_prefixDict prefixDict
SeqCollector seqCollector
ZSTD_compressionStage_e stage
ZSTD_CCtx_params requestedParams
rawSeqStore_t externSeqStore
unsigned long long pledgedSrcSizePlusOne
ZSTD_blockState_t blockState
ZSTD_cStreamStage streamStage
unsigned long long consumedSrcSize
unsigned long long producedCSize
size_t outBuffFlushedSize
size_t outBuffContentSize
ZSTD_compressionParameters cParams
const ZSTD_matchState_t * dictMatchState
ZSTD_dictContentType_e dictContentType
struct XXH64_state_s XXH64_state_t
ZSTDLIB_API ZSTD_bounds ZSTD_cParam_getBounds(ZSTD_cParameter cParam)
ZSTD_blockCompressor ZSTD_selectBlockCompressor(ZSTD_strategy strat, ZSTD_dictMode_e dictMode)
size_t ZSTD_compress_advanced_internal(ZSTD_CCtx *cctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize, const void *dict, size_t dictSize, const ZSTD_CCtx_params *params)
MEM_STATIC size_t ZSTD_minGain(size_t srcSize, ZSTD_strategy strat)
MEM_STATIC U32 ZSTD_MLcode(U32 mlBase)
static size_t ZSTD_hash6Ptr(const void *p, U32 h)
MEM_STATIC ZSTD_dictMode_e ZSTD_matchState_dictMode(const ZSTD_matchState_t *ms)
static const U64 prime7bytes
static size_t ZSTD_hash6(U64 u, U32 h)
static const U32 prime4bytes
MEM_STATIC void ZSTD_window_clear(ZSTD_window_t *window)
static size_t ZSTD_hash5(U64 u, U32 h)
static const U64 prime6bytes
MEM_STATIC U64 ZSTD_rollingHash_compute(void const *buf, size_t size)
MEM_STATIC U64 ZSTD_rollingHash_rotate(U64 hash, BYTE toRemove, BYTE toAdd, U64 primePower)
size_t ZSTD_referenceExternalSequences(ZSTD_CCtx *cctx, rawSeq *seq, size_t nbSeq)
MEM_STATIC U32 ZSTD_window_needOverflowCorrection(ZSTD_window_t const window, void const *srcEnd)
static U32 ZSTD_hash4(U32 u, U32 h)
static size_t ZSTD_hash8(U64 u, U32 h)
MEM_STATIC size_t ZSTD_noCompressBlock(void *dst, size_t dstCapacity, const void *src, size_t srcSize, U32 lastBlock)
MEM_STATIC size_t ZSTD_count_2segments(const BYTE *ip, const BYTE *match, const BYTE *iEnd, const BYTE *mEnd, const BYTE *iStart)
static size_t ZSTD_hash8Ptr(const void *p, U32 h)
MEM_STATIC U64 ZSTD_rollingHash_primePower(U32 length)
MEM_STATIC repcodes_t ZSTD_updateRep(U32 const rep[3], U32 const offset, U32 const ll0)
static U64 ZSTD_ipow(U64 base, U64 exponent)
MEM_STATIC size_t ZSTD_hashPtr(const void *p, U32 hBits, U32 mls)
size_t ZSTD_loadCEntropy(ZSTD_compressedBlockState_t *bs, void *workspace, short *offcodeNCount, unsigned *offcodeMaxValue, const void *const dict, size_t dictSize)
static unsigned ZSTD_NbCommonBytes(size_t val)
MEM_STATIC U32 ZSTD_getLowestPrefixIndex(const ZSTD_matchState_t *ms, U32 current, unsigned windowLog)
MEM_STATIC U32 ZSTD_window_hasExtDict(ZSTD_window_t const window)
struct repcodes_s repcodes_t
MEM_STATIC U32 ZSTD_LLcode(U32 litLength)
static U64 ZSTD_rollingHash_append(U64 hash, void const *buf, size_t size)
MEM_STATIC U32 ZSTD_getLowestMatchIndex(const ZSTD_matchState_t *ms, U32 current, unsigned windowLog)
void ZSTD_resetSeqStore(seqStore_t *ssPtr)
MEM_STATIC void ZSTD_window_init(ZSTD_window_t *window)
MEM_STATIC size_t ZSTD_count(const BYTE *pIn, const BYTE *pMatch, const BYTE *const pInLimit)
size_t ZSTD_compressBegin_advanced_internal(ZSTD_CCtx *cctx, const void *dict, size_t dictSize, ZSTD_dictContentType_e dictContentType, ZSTD_dictTableLoadMethod_e dtlm, const ZSTD_CDict *cdict, const ZSTD_CCtx_params *params, unsigned long long pledgedSrcSize)
struct ZSTD_prefixDict_s ZSTD_prefixDict
size_t ZSTD_initCStream_internal(ZSTD_CStream *zcs, const void *dict, size_t dictSize, const ZSTD_CDict *cdict, const ZSTD_CCtx_params *params, unsigned long long pledgedSrcSize)
size_t(* ZSTD_blockCompressor)(ZSTD_matchState_t *bs, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
static size_t ZSTD_hash5Ptr(const void *p, U32 h)
MEM_STATIC int ZSTD_disableLiteralsCompression(const ZSTD_CCtx_params *cctxParams)
MEM_STATIC size_t ZSTD_rleCompressBlock(void *dst, size_t dstCapacity, BYTE src, size_t srcSize, U32 lastBlock)
MEM_STATIC int ZSTD_cParam_withinBounds(ZSTD_cParameter cParam, int value)
MEM_STATIC U32 ZSTD_window_update(ZSTD_window_t *window, void const *src, size_t srcSize)
static const U32 prime3bytes
MEM_STATIC void ZSTD_checkDictValidity(const ZSTD_window_t *window, const void *blockEnd, U32 maxDist, U32 *loadedDictEndPtr, const ZSTD_matchState_t **dictMatchStatePtr)
static void ZSTD_safecopyLiterals(BYTE *op, BYTE const *ip, BYTE const *const iend, BYTE const *ilimit_w)
MEM_STATIC size_t ZSTD_hash3Ptr(const void *ptr, U32 h)
MEM_STATIC void ZSTD_window_enforceMaxDist(ZSTD_window_t *window, const void *blockEnd, U32 maxDist, U32 *loadedDictEndPtr, const ZSTD_matchState_t **dictMatchStatePtr)
U32 ZSTD_cycleLog(U32 hashLog, ZSTD_strategy strat)
HINT_INLINE UNUSED_ATTR void ZSTD_storeSeq(seqStore_t *seqStorePtr, size_t litLength, const BYTE *literals, const BYTE *litLimit, U32 offCode, size_t mlBase)
ZSTD_dictTableLoadMethod_e
static const U64 prime8bytes
size_t ZSTD_writeLastEmptyBlock(void *dst, size_t dstCapacity)
static U32 ZSTD_hash3(U32 u, U32 h)
static size_t ZSTD_hash7Ptr(const void *p, U32 h)
void ZSTD_reset_compressedBlockState(ZSTD_compressedBlockState_t *bs)
MEM_STATIC U32 ZSTD_window_correctOverflow(ZSTD_window_t *window, U32 cycleLog, U32 maxDist, void const *src)
static size_t ZSTD_hash4Ptr(const void *ptr, U32 h)
#define ZSTD_ROLL_HASH_CHAR_OFFSET
static const U64 prime5bytes
ZSTD_compressionParameters ZSTD_getCParamsFromCCtxParams(const ZSTD_CCtx_params *CCtxParams, U64 srcSizeHint, size_t dictSize)
ZSTD_compressionParameters ZSTD_getCParamsFromCDict(const ZSTD_CDict *cdict)
static size_t ZSTD_hash7(U64 u, U32 h)
static const size_t ZSTD_blockHeaderSize
#define WILDCOPY_OVERLENGTH
MEM_STATIC U32 ZSTD_highbit32(U32 val)
#define RETURN_ERROR_IF(cond, err,...)
static void ZSTD_copy16(void *dst, const void *src)
MEM_STATIC FORCE_INLINE_ATTR void ZSTD_wildcopy(void *dst, const void *src, ptrdiff_t length, ZSTD_overlap_e const ovtype)
#define ZSTD_STATIC_ASSERT(c)