ReactOS  0.4.15-dev-4594-g505ac65
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 319 of file zstd_double_fast.c.

322 {
323  const U32 mls = ms->cParams.minMatch;
324  switch(mls)
325  {
326  default: /* includes case 3 */
327  case 4 :
328  return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 4, ZSTD_noDict);
329  case 5 :
330  return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 5, ZSTD_noDict);
331  case 6 :
332  return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 6, ZSTD_noDict);
333  case 7 :
334  return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 7, ZSTD_noDict);
335  }
336 }
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 339 of file zstd_double_fast.c.

342 {
343  const U32 mls = ms->cParams.minMatch;
344  switch(mls)
345  {
346  default: /* includes case 3 */
347  case 4 :
348  return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 4, ZSTD_dictMatchState);
349  case 5 :
350  return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 5, ZSTD_dictMatchState);
351  case 6 :
352  return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 6, ZSTD_dictMatchState);
353  case 7 :
354  return ZSTD_compressBlock_doubleFast_generic(ms, seqStore, rep, src, srcSize, 7, ZSTD_dictMatchState);
355  }
356 }
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 504 of file zstd_double_fast.c.

507 {
508  U32 const mls = ms->cParams.minMatch;
509  switch(mls)
510  {
511  default: /* includes case 3 */
512  case 4 :
513  return ZSTD_compressBlock_doubleFast_extDict_generic(ms, seqStore, rep, src, srcSize, 4);
514  case 5 :
515  return ZSTD_compressBlock_doubleFast_extDict_generic(ms, seqStore, rep, src, srcSize, 5);
516  case 6 :
517  return ZSTD_compressBlock_doubleFast_extDict_generic(ms, seqStore, rep, src, srcSize, 6);
518  case 7 :
519  return ZSTD_compressBlock_doubleFast_extDict_generic(ms, seqStore, rep, src, srcSize, 7);
520  }
521 }
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->minMatch;
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 }
void mls(int argc, const char *argv[])
Definition: cmds.c:1168
ZSTD_compressionParameters cParams
Definition: dhcpd.h:61
struct task_struct * current
Definition: linux.c:32
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

Referenced by ZSTD_ldm_fillFastTables(), and ZSTD_loadDictionaryContent().