ReactOS  0.4.15-dev-1386-g5cb9f87
zstd_double_fast.h File Reference
#include "mem.h"
#include "zstd_compress_internal.h"
Include dependency graph for zstd_double_fast.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void ZSTD_fillDoubleHashTable (ZSTD_matchState_t *ms, void const *end, ZSTD_dictTableLoadMethod_e dtlm)
 
size_t ZSTD_compressBlock_doubleFast (ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
 
size_t ZSTD_compressBlock_doubleFast_dictMatchState (ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
 
size_t ZSTD_compressBlock_doubleFast_extDict (ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize)
 

Function Documentation

◆ ZSTD_compressBlock_doubleFast()

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

Definition at line 308 of file zstd_double_fast.c.

311 {
312  const U32 mls = ms->cParams.searchLength;
313  switch(mls)
314  {
315  default: /* includes case 3 */
316  case 4 :
317  return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 4, ZSTD_noDict);
318  case 5 :
319  return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 5, ZSTD_noDict);
320  case 6 :
321  return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 6, ZSTD_noDict);
322  case 7 :
323  return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 7, ZSTD_noDict);
324  }
325 }
void mls(int argc, const char *argv[])
Definition: cmds.c:1168
ZSTD_compressionParameters cParams
GLenum src
Definition: glext.h:6340
FORCE_INLINE_TEMPLATE size_t ZSTD_compressBlock_doubleFast_generic(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize, U32 const mls, ZSTD_dictMode_e const dictMode)
unsigned int U32
Definition: xxhash.c:195

Referenced by ZSTD_selectBlockCompressor().

◆ ZSTD_compressBlock_doubleFast_dictMatchState()

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

Definition at line 328 of file zstd_double_fast.c.

331 {
332  const U32 mls = ms->cParams.searchLength;
333  switch(mls)
334  {
335  default: /* includes case 3 */
336  case 4 :
337  return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 4, ZSTD_dictMatchState);
338  case 5 :
339  return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 5, ZSTD_dictMatchState);
340  case 6 :
341  return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 6, ZSTD_dictMatchState);
342  case 7 :
343  return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 7, ZSTD_dictMatchState);
344  }
345 }
void mls(int argc, const char *argv[])
Definition: cmds.c:1168
ZSTD_compressionParameters cParams
GLenum src
Definition: glext.h:6340
FORCE_INLINE_TEMPLATE size_t ZSTD_compressBlock_doubleFast_generic(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize, U32 const mls, ZSTD_dictMode_e const dictMode)
unsigned int U32
Definition: xxhash.c:195

Referenced by ZSTD_selectBlockCompressor().

◆ ZSTD_compressBlock_doubleFast_extDict()

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

Definition at line 482 of file zstd_double_fast.c.

485 {
486  U32 const mls = ms->cParams.searchLength;
487  switch(mls)
488  {
489  default: /* includes case 3 */
490  case 4 :
491  return ZSTD_compressBlock_doubleFast_extDict_generic(ms, seqStore, rep, src, srcSize, 4);
492  case 5 :
493  return ZSTD_compressBlock_doubleFast_extDict_generic(ms, seqStore, rep, src, srcSize, 5);
494  case 6 :
495  return ZSTD_compressBlock_doubleFast_extDict_generic(ms, seqStore, rep, src, srcSize, 6);
496  case 7 :
497  return ZSTD_compressBlock_doubleFast_extDict_generic(ms, seqStore, rep, src, srcSize, 7);
498  }
499 }
void mls(int argc, const char *argv[])
Definition: cmds.c:1168
ZSTD_compressionParameters cParams
GLenum src
Definition: glext.h:6340
static size_t ZSTD_compressBlock_doubleFast_extDict_generic(ZSTD_matchState_t *ms, seqStore_t *seqStore, U32 rep[ZSTD_REP_NUM], void const *src, size_t srcSize, U32 const mls)
unsigned int U32
Definition: xxhash.c:195

Referenced by ZSTD_selectBlockCompressor().

◆ ZSTD_fillDoubleHashTable()

void ZSTD_fillDoubleHashTable ( ZSTD_matchState_t ms,
void const end,
ZSTD_dictTableLoadMethod_e  dtlm 
)

Definition at line 15 of file zstd_double_fast.c.

17 {
18  const ZSTD_compressionParameters* const cParams = &ms->cParams;
19  U32* const hashLarge = ms->hashTable;
20  U32 const hBitsL = cParams->hashLog;
21  U32 const mls = cParams->searchLength;
22  U32* const hashSmall = ms->chainTable;
23  U32 const hBitsS = cParams->chainLog;
24  const BYTE* const base = ms->window.base;
25  const BYTE* ip = base + ms->nextToUpdate;
26  const BYTE* const iend = ((const BYTE*)end) - HASH_READ_SIZE;
27  const U32 fastHashFillStep = 3;
28 
29  /* Always insert every fastHashFillStep position into the hash tables.
30  * Insert the other positions into the large hash table if their entry
31  * is empty.
32  */
33  for (; ip + fastHashFillStep - 1 <= iend; ip += fastHashFillStep) {
34  U32 const current = (U32)(ip - base);
35  U32 i;
36  for (i = 0; i < fastHashFillStep; ++i) {
37  size_t const smHash = ZSTD_hashPtr(ip + i, hBitsS, mls);
38  size_t const lgHash = ZSTD_hashPtr(ip + i, hBitsL, 8);
39  if (i == 0)
40  hashSmall[smHash] = current + i;
41  if (i == 0 || hashLarge[lgHash] == 0)
42  hashLarge[lgHash] = current + i;
43  /* Only load extra positions for ZSTD_dtlm_full */
44  if (dtlm == ZSTD_dtlm_fast)
45  break;
46  }
47  }
48 }
void mls(int argc, const char *argv[])
Definition: cmds.c:1168
ZSTD_compressionParameters cParams
Definition: dhcpd.h:61
GLuint GLuint end
Definition: gl.h:1545
#define HASH_READ_SIZE
unsigned char BYTE
Definition: xxhash.c:193
MEM_STATIC size_t ZSTD_hashPtr(const void *p, U32 hBits, U32 mls)
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 const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int U32
Definition: xxhash.c:195
struct task_struct * current
Definition: linux.c:32

Referenced by ZSTD_ldm_fillFastTables(), and ZSTD_loadDictionaryContent().