ReactOS  0.4.15-dev-492-ga1108f6
zstd_opt.h File Reference
Include dependency graph for zstd_opt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void ZSTD_updateTree (ZSTD_matchState_t *ms, const BYTE *ip, const BYTE *iend)
 
size_t ZSTD_compressBlock_btopt (ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
 
size_t ZSTD_compressBlock_btultra (ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
 
size_t ZSTD_compressBlock_btopt_dictMatchState (ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
 
size_t ZSTD_compressBlock_btultra_dictMatchState (ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
 
size_t ZSTD_compressBlock_btopt_extDict (ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
 
size_t ZSTD_compressBlock_btultra_extDict (ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
 

Function Documentation

◆ ZSTD_compressBlock_btopt()

size_t ZSTD_compressBlock_btopt ( ZSTD_matchState_t ms,
seqStore_t seqStore,
U32  rep[ZSTD_REP_NUM],
void const src,
size_t  srcSize 
)

Definition at line 1040 of file zstd_opt.c.

1043 {
1044  DEBUGLOG(5, "ZSTD_compressBlock_btopt");
1045  return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 0 /*optLevel*/, ZSTD_noDict);
1046 }
#define DEBUGLOG(l,...)
Definition: debug.h:115
FORCE_INLINE_TEMPLATE size_t ZSTD_compressBlock_opt_generic(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], const void *src, size_t srcSize, const int optLevel, const ZSTD_dictMode_e dictMode)
Definition: zstd_opt.c:778
GLenum src
Definition: glext.h:6340

Referenced by ZSTD_selectBlockCompressor().

◆ ZSTD_compressBlock_btopt_dictMatchState()

size_t ZSTD_compressBlock_btopt_dictMatchState ( ZSTD_matchState_t ms,
seqStore_t seqStore,
U32  rep[ZSTD_REP_NUM],
void const src,
size_t  srcSize 
)

Definition at line 1106 of file zstd_opt.c.

1109 {
1110  return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 0 /*optLevel*/, ZSTD_dictMatchState);
1111 }
FORCE_INLINE_TEMPLATE size_t ZSTD_compressBlock_opt_generic(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], const void *src, size_t srcSize, const int optLevel, const ZSTD_dictMode_e dictMode)
Definition: zstd_opt.c:778
GLenum src
Definition: glext.h:6340

Referenced by ZSTD_selectBlockCompressor().

◆ ZSTD_compressBlock_btopt_extDict()

size_t ZSTD_compressBlock_btopt_extDict ( ZSTD_matchState_t ms,
seqStore_t seqStore,
U32  rep[ZSTD_REP_NUM],
void const src,
size_t  srcSize 
)

Definition at line 1120 of file zstd_opt.c.

1123 {
1124  return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 0 /*optLevel*/, ZSTD_extDict);
1125 }
FORCE_INLINE_TEMPLATE size_t ZSTD_compressBlock_opt_generic(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], const void *src, size_t srcSize, const int optLevel, const ZSTD_dictMode_e dictMode)
Definition: zstd_opt.c:778
GLenum src
Definition: glext.h:6340

Referenced by ZSTD_selectBlockCompressor().

◆ ZSTD_compressBlock_btultra()

size_t ZSTD_compressBlock_btultra ( ZSTD_matchState_t ms,
seqStore_t seqStore,
U32  rep[ZSTD_REP_NUM],
void const src,
size_t  srcSize 
)

Definition at line 1071 of file zstd_opt.c.

1074 {
1075  DEBUGLOG(5, "ZSTD_compressBlock_btultra (srcSize=%zu)", srcSize);
1076 #if 0
1077  /* 2-pass strategy (disabled)
1078  * this strategy makes a first pass over first block to collect statistics
1079  * and seed next round's statistics with it.
1080  * The compression ratio gain is generally small (~0.5% on first block),
1081  * the cost is 2x cpu time on first block. */
1082  assert(srcSize <= ZSTD_BLOCKSIZE_MAX);
1083  if ( (ms->opt.litLengthSum==0) /* first block */
1084  && (seqStore->sequences == seqStore->sequencesStart) /* no ldm */
1085  && (ms->window.dictLimit == ms->window.lowLimit) ) { /* no dictionary */
1086  U32 tmpRep[ZSTD_REP_NUM];
1087  DEBUGLOG(5, "ZSTD_compressBlock_btultra: first block: collecting statistics");
1088  assert(ms->nextToUpdate >= ms->window.dictLimit
1089  && ms->nextToUpdate <= ms->window.dictLimit + 1);
1090  memcpy(tmpRep, rep, sizeof(tmpRep));
1091  ZSTD_compressBlock_opt_generic(ms, seqStore, tmpRep, src, srcSize, 2 /*optLevel*/, ZSTD_noDict); /* generate stats into ms->opt*/
1092  ZSTD_resetSeqStore(seqStore);
1093  /* invalidate first scan from history */
1094  ms->window.base -= srcSize;
1095  ms->window.dictLimit += (U32)srcSize;
1096  ms->window.lowLimit = ms->window.dictLimit;
1097  ms->nextToUpdate = ms->window.dictLimit;
1098  ms->nextToUpdate3 = ms->window.dictLimit;
1099  /* re-inforce weight of collected statistics */
1100  ZSTD_upscaleStats(&ms->opt);
1101  }
1102 #endif
1103  return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 2 /*optLevel*/, ZSTD_noDict);
1104 }
#define assert(x)
Definition: debug.h:53
seqDef * sequencesStart
#define DEBUGLOG(l,...)
Definition: debug.h:115
seqDef * sequences
void ZSTD_resetSeqStore(seqStore_t *ssPtr)
MEM_STATIC void ZSTD_upscaleStats(optState_t *optPtr)
Definition: zstd_opt.c:1063
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
FORCE_INLINE_TEMPLATE size_t ZSTD_compressBlock_opt_generic(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], const void *src, size_t srcSize, const int optLevel, const ZSTD_dictMode_e dictMode)
Definition: zstd_opt.c:778
GLenum src
Definition: glext.h:6340
unsigned int U32
Definition: xxhash.c:195
#define ZSTD_REP_NUM
Definition: zstd_internal.h:62

Referenced by ZSTD_selectBlockCompressor().

◆ ZSTD_compressBlock_btultra_dictMatchState()

size_t ZSTD_compressBlock_btultra_dictMatchState ( ZSTD_matchState_t ms,
seqStore_t seqStore,
U32  rep[ZSTD_REP_NUM],
void const src,
size_t  srcSize 
)

Definition at line 1113 of file zstd_opt.c.

1116 {
1117  return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 2 /*optLevel*/, ZSTD_dictMatchState);
1118 }
FORCE_INLINE_TEMPLATE size_t ZSTD_compressBlock_opt_generic(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], const void *src, size_t srcSize, const int optLevel, const ZSTD_dictMode_e dictMode)
Definition: zstd_opt.c:778
GLenum src
Definition: glext.h:6340

Referenced by ZSTD_selectBlockCompressor().

◆ ZSTD_compressBlock_btultra_extDict()

size_t ZSTD_compressBlock_btultra_extDict ( ZSTD_matchState_t ms,
seqStore_t seqStore,
U32  rep[ZSTD_REP_NUM],
void const src,
size_t  srcSize 
)

Definition at line 1127 of file zstd_opt.c.

1130 {
1131  return ZSTD_compressBlock_opt_generic(ms, seqStore, rep, src, srcSize, 2 /*optLevel*/, ZSTD_extDict);
1132 }
FORCE_INLINE_TEMPLATE size_t ZSTD_compressBlock_opt_generic(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], const void *src, size_t srcSize, const int optLevel, const ZSTD_dictMode_e dictMode)
Definition: zstd_opt.c:778
GLenum src
Definition: glext.h:6340

Referenced by ZSTD_selectBlockCompressor().

◆ ZSTD_updateTree()

void ZSTD_updateTree ( ZSTD_matchState_t ms,
const BYTE ip,
const BYTE iend 
)

Definition at line 490 of file zstd_opt.c.

490  {
491  ZSTD_updateTree_internal(ms, ip, iend, ms->cParams.searchLength, ZSTD_noDict);
492 }
FORCE_INLINE_TEMPLATE void ZSTD_updateTree_internal(ZSTD_matchState_t *ms, const BYTE *const ip, const BYTE *const iend, const U32 mls, const ZSTD_dictMode_e dictMode)
Definition: zstd_opt.c:474
ZSTD_compressionParameters cParams
Definition: dhcpd.h:61

Referenced by ZSTD_loadDictionaryContent().