ReactOS  0.4.15-dev-1171-gab82533
zstd_internal.h File Reference
#include "compiler.h"
#include "mem.h"
#include "debug.h"
#include "error_private.h"
#include "zstd.h"
#include "fse.h"
#include "huf.h"
#include "../xxhash.h"
Include dependency graph for zstd_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  seqDef_s
 
struct  seqStore_t
 
struct  blockProperties_t
 

Macros

#define ZSTD_STATIC_LINKING_ONLY
 
#define FSE_STATIC_LINKING_ONLY
 
#define HUF_STATIC_LINKING_ONLY
 
#define XXH_STATIC_LINKING_ONLY   /* XXH64_state_t */
 
#define ZSTD_STATIC_ASSERT(c)   DEBUG_STATIC_ASSERT(c)
 
#define MIN(a, b)   ((a)<(b) ? (a) : (b))
 
#define MAX(a, b)   ((a)>(b) ? (a) : (b))
 
#define CHECK_F(f)   { size_t const errcod = f; if (ERR_isError(errcod)) return errcod; } /* check and Forward error code */
 
#define CHECK_E(f, e)   { size_t const errcod = f; if (ERR_isError(errcod)) return ERROR(e); } /* check and send Error code */
 
#define ZSTD_OPT_NUM   (1<<12)
 
#define ZSTD_REP_NUM   3 /* number of repcodes */
 
#define ZSTD_REP_MOVE   (ZSTD_REP_NUM-1)
 
#define KB   *(1 <<10)
 
#define MB   *(1 <<20)
 
#define GB   *(1U<<30)
 
#define BIT7   128
 
#define BIT6   64
 
#define BIT5   32
 
#define BIT4   16
 
#define BIT1   2
 
#define BIT0   1
 
#define ZSTD_WINDOWLOG_ABSOLUTEMIN   10
 
#define ZSTD_WINDOWLOG_DEFAULTMAX   27 /* Default maximum allowed window log */
 
#define ZSTD_FRAMEIDSIZE   4 /* magic number size */
 
#define ZSTD_BLOCKHEADERSIZE   3 /* C standard doesn't allow `static const` variable to be init using another `static const` variable */
 
#define MIN_SEQUENCES_SIZE   1 /* nbSeq==0 */
 
#define MIN_CBLOCK_SIZE   (1 /*litCSize*/ + 1 /* RLE or RAW */ + MIN_SEQUENCES_SIZE /* nbSeq==0 */) /* for a non-null block */
 
#define HufLog   12
 
#define LONGNBSEQ   0x7F00
 
#define MINMATCH   3
 
#define Litbits   8
 
#define MaxLit   ((1<<Litbits) - 1)
 
#define MaxML   52
 
#define MaxLL   35
 
#define DefaultMaxOff   28
 
#define MaxOff   31
 
#define MaxSeq   MAX(MaxLL, MaxML) /* Assumption : MaxOff < MaxLL,MaxML */
 
#define MLFSELog   9
 
#define LLFSELog   9
 
#define OffFSELog   8
 
#define MaxFSELog   MAX(MAX(MLFSELog, LLFSELog), OffFSELog)
 
#define LL_DEFAULTNORMLOG   6 /* for static allocation */
 
#define ML_DEFAULTNORMLOG   6 /* for static allocation */
 
#define OF_DEFAULTNORMLOG   5 /* for static allocation */
 
#define COPY8(d, s)   { ZSTD_copy8(d,s); d+=8; s+=8; }
 
#define WILDCOPY_OVERLENGTH   8
 

Typedefs

typedef struct seqDef_s seqDef
 

Enumerations

enum  blockType_e { bt_raw, bt_rle, bt_compressed, bt_reserved }
 
enum  symbolEncodingType_e { set_basic, set_rle, set_compressed, set_repeat }
 

Functions

static void ZSTD_copy8 (void *dst, const void *src)
 
MEM_STATIC void ZSTD_wildcopy (void *dst, const void *src, ptrdiff_t length)
 
MEM_STATIC void ZSTD_wildcopy_e (void *dst, const void *src, void *dstEnd)
 
const seqStore_tZSTD_getSeqStore (const ZSTD_CCtx *ctx)
 
void ZSTD_seqToCodes (const seqStore_t *seqStorePtr)
 
voidZSTD_malloc (size_t size, ZSTD_customMem customMem)
 
voidZSTD_calloc (size_t size, ZSTD_customMem customMem)
 
void ZSTD_free (void *ptr, ZSTD_customMem customMem)
 
MEM_STATIC U32 ZSTD_highbit32 (U32 val)
 
void ZSTD_invalidateRepCodes (ZSTD_CCtx *cctx)
 
size_t ZSTD_getcBlockSize (const void *src, size_t srcSize, blockProperties_t *bpPtr)
 

Variables

static const U32 repStartValue [ZSTD_REP_NUM] = { 1, 4, 8 }
 
static const size_t ZSTD_fcs_fieldSize [4] = { 0, 2, 4, 8 }
 
static const size_t ZSTD_did_fieldSize [4] = { 0, 1, 2, 4 }
 
static const size_t ZSTD_blockHeaderSize = ZSTD_BLOCKHEADERSIZE
 
static const U32 LL_bits [MaxLL+1]
 
static const S16 LL_defaultNorm [MaxLL+1]
 
static const U32 LL_defaultNormLog = LL_DEFAULTNORMLOG
 
static const U32 ML_bits [MaxML+1]
 
static const S16 ML_defaultNorm [MaxML+1]
 
static const U32 ML_defaultNormLog = ML_DEFAULTNORMLOG
 
static const S16 OF_defaultNorm [DefaultMaxOff+1]
 
static const U32 OF_defaultNormLog = OF_DEFAULTNORMLOG
 

Macro Definition Documentation

◆ BIT0

#define BIT0   1

Definition at line 75 of file zstd_internal.h.

◆ BIT1

#define BIT1   2

Definition at line 74 of file zstd_internal.h.

◆ BIT4

#define BIT4   16

Definition at line 73 of file zstd_internal.h.

◆ BIT5

#define BIT5   32

Definition at line 72 of file zstd_internal.h.

◆ BIT6

#define BIT6   64

Definition at line 71 of file zstd_internal.h.

◆ BIT7

#define BIT7   128

Definition at line 70 of file zstd_internal.h.

◆ CHECK_E

#define CHECK_E (   f,
  e 
)    { size_t const errcod = f; if (ERR_isError(errcod)) return ERROR(e); } /* check and send Error code */

Definition at line 54 of file zstd_internal.h.

◆ CHECK_F

#define CHECK_F (   f)    { size_t const errcod = f; if (ERR_isError(errcod)) return errcod; } /* check and Forward error code */

Definition at line 53 of file zstd_internal.h.

◆ COPY8

#define COPY8 (   d,
  s 
)    { ZSTD_copy8(d,s); d+=8; s+=8; }

Definition at line 152 of file zstd_internal.h.

◆ DefaultMaxOff

#define DefaultMaxOff   28

Definition at line 102 of file zstd_internal.h.

◆ FSE_STATIC_LINKING_ONLY

#define FSE_STATIC_LINKING_ONLY

Definition at line 28 of file zstd_internal.h.

◆ GB

#define GB   *(1U<<30)

Definition at line 68 of file zstd_internal.h.

◆ HUF_STATIC_LINKING_ONLY

#define HUF_STATIC_LINKING_ONLY

Definition at line 30 of file zstd_internal.h.

◆ HufLog

#define HufLog   12

Definition at line 91 of file zstd_internal.h.

◆ KB

#define KB   *(1 <<10)

Definition at line 66 of file zstd_internal.h.

◆ Litbits

#define Litbits   8

Definition at line 98 of file zstd_internal.h.

◆ LL_DEFAULTNORMLOG

#define LL_DEFAULTNORMLOG   6 /* for static allocation */

Definition at line 120 of file zstd_internal.h.

◆ LLFSELog

#define LLFSELog   9

Definition at line 106 of file zstd_internal.h.

◆ LONGNBSEQ

#define LONGNBSEQ   0x7F00

Definition at line 94 of file zstd_internal.h.

◆ MAX

#define MAX (   a,
  b 
)    ((a)>(b) ? (a) : (b))

Definition at line 52 of file zstd_internal.h.

◆ MaxFSELog

#define MaxFSELog   MAX(MAX(MLFSELog, LLFSELog), OffFSELog)

Definition at line 108 of file zstd_internal.h.

◆ MaxLit

#define MaxLit   ((1<<Litbits) - 1)

Definition at line 99 of file zstd_internal.h.

◆ MaxLL

#define MaxLL   35

Definition at line 101 of file zstd_internal.h.

◆ MaxML

#define MaxML   52

Definition at line 100 of file zstd_internal.h.

◆ MaxOff

#define MaxOff   31

Definition at line 103 of file zstd_internal.h.

◆ MaxSeq

#define MaxSeq   MAX(MaxLL, MaxML) /* Assumption : MaxOff < MaxLL,MaxML */

Definition at line 104 of file zstd_internal.h.

◆ MB

#define MB   *(1 <<20)

Definition at line 67 of file zstd_internal.h.

◆ MIN

#define MIN (   a,
  b 
)    ((a)<(b) ? (a) : (b))

Definition at line 51 of file zstd_internal.h.

◆ MIN_CBLOCK_SIZE

#define MIN_CBLOCK_SIZE   (1 /*litCSize*/ + 1 /* RLE or RAW */ + MIN_SEQUENCES_SIZE /* nbSeq==0 */) /* for a non-null block */

Definition at line 89 of file zstd_internal.h.

◆ MIN_SEQUENCES_SIZE

#define MIN_SEQUENCES_SIZE   1 /* nbSeq==0 */

Definition at line 88 of file zstd_internal.h.

◆ MINMATCH

#define MINMATCH   3

Definition at line 96 of file zstd_internal.h.

◆ ML_DEFAULTNORMLOG

#define ML_DEFAULTNORMLOG   6 /* for static allocation */

Definition at line 137 of file zstd_internal.h.

◆ MLFSELog

#define MLFSELog   9

Definition at line 105 of file zstd_internal.h.

◆ OF_DEFAULTNORMLOG

#define OF_DEFAULTNORMLOG   5 /* for static allocation */

Definition at line 144 of file zstd_internal.h.

◆ OffFSELog

#define OffFSELog   8

Definition at line 107 of file zstd_internal.h.

◆ WILDCOPY_OVERLENGTH

#define WILDCOPY_OVERLENGTH   8

ZSTD_wildcopy() : custom version of memcpy(), can overwrite up to WILDCOPY_OVERLENGTH bytes (if length==0)

Definition at line 156 of file zstd_internal.h.

◆ XXH_STATIC_LINKING_ONLY

#define XXH_STATIC_LINKING_ONLY   /* XXH64_state_t */

Definition at line 33 of file zstd_internal.h.

◆ ZSTD_BLOCKHEADERSIZE

#define ZSTD_BLOCKHEADERSIZE   3 /* C standard doesn't allow `static const` variable to be init using another `static const` variable */

Definition at line 84 of file zstd_internal.h.

◆ ZSTD_FRAMEIDSIZE

#define ZSTD_FRAMEIDSIZE   4 /* magic number size */

Definition at line 82 of file zstd_internal.h.

◆ ZSTD_OPT_NUM

#define ZSTD_OPT_NUM   (1<<12)

Definition at line 60 of file zstd_internal.h.

◆ ZSTD_REP_MOVE

#define ZSTD_REP_MOVE   (ZSTD_REP_NUM-1)

Definition at line 63 of file zstd_internal.h.

◆ ZSTD_REP_NUM

#define ZSTD_REP_NUM   3 /* number of repcodes */

Definition at line 62 of file zstd_internal.h.

◆ ZSTD_STATIC_ASSERT

#define ZSTD_STATIC_ASSERT (   c)    DEBUG_STATIC_ASSERT(c)

Definition at line 43 of file zstd_internal.h.

◆ ZSTD_STATIC_LINKING_ONLY

#define ZSTD_STATIC_LINKING_ONLY

Definition at line 26 of file zstd_internal.h.

◆ ZSTD_WINDOWLOG_ABSOLUTEMIN

#define ZSTD_WINDOWLOG_ABSOLUTEMIN   10

Definition at line 77 of file zstd_internal.h.

◆ ZSTD_WINDOWLOG_DEFAULTMAX

#define ZSTD_WINDOWLOG_DEFAULTMAX   27 /* Default maximum allowed window log */

Definition at line 78 of file zstd_internal.h.

Typedef Documentation

◆ seqDef

Enumeration Type Documentation

◆ blockType_e

Enumerator
bt_raw 
bt_rle 
bt_compressed 
bt_reserved 

Definition at line 86 of file zstd_internal.h.

◆ symbolEncodingType_e

Enumerator
set_basic 
set_rle 
set_compressed 
set_repeat 

Definition at line 92 of file zstd_internal.h.

Function Documentation

◆ ZSTD_calloc()

void* ZSTD_calloc ( size_t  size,
ZSTD_customMem  customMem 
)

Definition at line 59 of file zstd_common.c.

60 {
61  /* calloc implemented as malloc+memset;
62  * not as efficient as calloc, but next best guess for custom malloc */
63  void* const ptr = customMem.customAlloc(customMem.opaque, size);
64  memset(ptr, 0, size);
65  return ptr;
66 }
static PVOID ptr
Definition: dispmode.c:27
GLsizeiptr size
Definition: glext.h:5919
#define memset(x, y, z)
Definition: compat.h:39

Referenced by ZSTD_createCCtxParams_advanced().

◆ ZSTD_copy8()

static void ZSTD_copy8 ( void dst,
const void src 
)
static

Definition at line 151 of file zstd_internal.h.

151 { memcpy(dst, src, 8); }
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340

Referenced by ZSTD_execSequence(), and ZSTD_execSequenceLong().

◆ ZSTD_free()

void ZSTD_free ( void ptr,
ZSTD_customMem  customMem 
)

Definition at line 68 of file zstd_common.c.

69 {
70  if (ptr!=NULL)
71  customMem.customFree(customMem.opaque, ptr);
72 }
static PVOID ptr
Definition: dispmode.c:27
smooth NULL
Definition: ftsmooth.c:416

Referenced by ZSTD_createCDict_advanced(), ZSTD_decompressStream(), ZSTD_freeCCtx(), ZSTD_freeCCtxContent(), ZSTD_freeCCtxParams(), ZSTD_freeCDict(), ZSTD_freeDCtx(), ZSTD_freeDDict(), and ZSTD_resetCCtx_internal().

◆ ZSTD_getcBlockSize()

size_t ZSTD_getcBlockSize ( const void src,
size_t  srcSize,
blockProperties_t bpPtr 
)

ZSTD_getcBlockSize() : Provides the size of compressed block from block header src

Definition at line 535 of file zstd_decompress.c.

537 {
538  if (srcSize < ZSTD_blockHeaderSize) return ERROR(srcSize_wrong);
539  { U32 const cBlockHeader = MEM_readLE24(src);
540  U32 const cSize = cBlockHeader >> 3;
541  bpPtr->lastBlock = cBlockHeader & 1;
542  bpPtr->blockType = (blockType_e)((cBlockHeader >> 1) & 3);
543  bpPtr->origSize = cSize; /* only useful for RLE */
544  if (bpPtr->blockType == bt_rle) return 1;
545  if (bpPtr->blockType == bt_reserved) return ERROR(corruption_detected);
546  return cSize;
547  }
548 }
blockType_e blockType
#define ERROR(name)
Definition: error_private.h:53
blockType_e
Definition: zstd_internal.h:86
static const size_t ZSTD_blockHeaderSize
Definition: zstd_internal.h:85
GLenum src
Definition: glext.h:6340
unsigned int U32
Definition: xxhash.c:195
MEM_STATIC U32 MEM_readLE24(const void *memPtr)
Definition: mem.h:262

Referenced by ZSTD_decompressContinue(), ZSTD_decompressFrame(), and ZSTD_findFrameCompressedSize().

◆ ZSTD_getSeqStore()

const seqStore_t* ZSTD_getSeqStore ( const ZSTD_CCtx ctx)

Definition at line 151 of file zstd_compress.c.

151 { return &(ctx->seqStore); }

◆ ZSTD_highbit32()

MEM_STATIC U32 ZSTD_highbit32 ( U32  val)

Definition at line 210 of file zstd_internal.h.

211 {
212  assert(val != 0);
213  {
214 # if defined(_MSC_VER) /* Visual */
215  unsigned long r=0;
216  _BitScanReverse(&r, val);
217  return (unsigned)r;
218 # elif defined(__GNUC__) && (__GNUC__ >= 3) /* GCC Intrinsic */
219  return 31 - __builtin_clz(val);
220 # else /* Software version */
221  static const U32 DeBruijnClz[32] = { 0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30, 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31 };
222  U32 v = val;
223  v |= v >> 1;
224  v |= v >> 2;
225  v |= v >> 4;
226  v |= v >> 8;
227  v |= v >> 16;
228  return DeBruijnClz[(v * 0x07C4ACDDU) >> 27];
229 # endif
230  }
231 }
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define U(x)
Definition: wordpad.c:45
#define assert(x)
Definition: debug.h:53
GLuint GLfloat * val
Definition: glext.h:7180
const GLdouble * v
Definition: gl.h:2040
unsigned char _BitScanReverse(unsigned long *_Index, unsigned long _Mask)
Definition: intrin_arm.h:180
unsigned int U32
Definition: xxhash.c:195

Referenced by ZSTD_adjustCParams_internal(), ZSTD_bitWeight(), ZSTD_compressBegin_usingCDict_advanced(), ZSTD_compressBlock_lazy_extDict_generic(), ZSTD_compressBlock_lazy_generic(), ZSTD_DUBT_findBestMatch(), ZSTD_DUBT_findBetterDictMatch(), ZSTD_fracWeight(), ZSTD_fWeight(), ZSTD_getMatchPrice(), ZSTD_LLcode(), ZSTD_loadZstdDictionary(), ZSTD_MLcode(), ZSTD_seqToCodes(), and ZSTD_updateStats().

◆ ZSTD_invalidateRepCodes()

void ZSTD_invalidateRepCodes ( ZSTD_CCtx cctx)

Definition at line 1299 of file zstd_compress.c.

1299  {
1300  int i;
1301  for (i=0; i<ZSTD_REP_NUM; i++) cctx->blockState.prevCBlock->rep[i] = 0;
1303 }
MEM_STATIC U32 ZSTD_window_hasExtDict(ZSTD_window_t const window)
#define assert(x)
Definition: debug.h:53
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
ZSTD_blockState_t blockState
ZSTD_matchState_t matchState
ZSTD_compressedBlockState_t * prevCBlock
#define ZSTD_REP_NUM
Definition: zstd_internal.h:62

◆ ZSTD_malloc()

void* ZSTD_malloc ( size_t  size,
ZSTD_customMem  customMem 
)

◆ ZSTD_seqToCodes()

void ZSTD_seqToCodes ( const seqStore_t seqStorePtr)

Definition at line 1760 of file zstd_compress.c.

1761 {
1762  const seqDef* const sequences = seqStorePtr->sequencesStart;
1763  BYTE* const llCodeTable = seqStorePtr->llCode;
1764  BYTE* const ofCodeTable = seqStorePtr->ofCode;
1765  BYTE* const mlCodeTable = seqStorePtr->mlCode;
1766  U32 const nbSeq = (U32)(seqStorePtr->sequences - seqStorePtr->sequencesStart);
1767  U32 u;
1768  assert(nbSeq <= seqStorePtr->maxNbSeq);
1769  for (u=0; u<nbSeq; u++) {
1770  U32 const llv = sequences[u].litLength;
1771  U32 const mlv = sequences[u].matchLength;
1772  llCodeTable[u] = (BYTE)ZSTD_LLcode(llv);
1773  ofCodeTable[u] = (BYTE)ZSTD_highbit32(sequences[u].offset);
1774  mlCodeTable[u] = (BYTE)ZSTD_MLcode(mlv);
1775  }
1776  if (seqStorePtr->longLengthID==1)
1777  llCodeTable[seqStorePtr->longLengthPos] = MaxLL;
1778  if (seqStorePtr->longLengthID==2)
1779  mlCodeTable[seqStorePtr->longLengthPos] = MaxML;
1780 }
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
Definition: glfuncs.h:240
BYTE * ofCode
GLintptr offset
Definition: glext.h:5920
#define assert(x)
Definition: debug.h:53
seqDef * sequencesStart
seqDef * sequences
MEM_STATIC U32 ZSTD_MLcode(U32 mlBase)
#define MaxML
BYTE * mlCode
unsigned char BYTE
Definition: xxhash.c:193
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
Definition: button.c:54
MEM_STATIC U32 ZSTD_highbit32(U32 val)
#define MaxLL
BYTE * llCode
MEM_STATIC U32 ZSTD_LLcode(U32 litLength)
unsigned int U32
Definition: xxhash.c:195

Referenced by ZSTD_compressSequences_internal().

◆ ZSTD_wildcopy()

MEM_STATIC void ZSTD_wildcopy ( void dst,
const void src,
ptrdiff_t  length 
)

Definition at line 157 of file zstd_internal.h.

158 {
159  const BYTE* ip = (const BYTE*)src;
160  BYTE* op = (BYTE*)dst;
161  BYTE* const oend = op + length;
162  do
163  COPY8(op, ip)
164  while (op < oend);
165 }
Definition: dhcpd.h:61
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
UINT op
Definition: effect.c:224
GLenum src
Definition: glext.h:6340
unsigned char BYTE
Definition: xxhash.c:193
#define COPY8(d, s)
GLenum GLenum dst
Definition: glext.h:6340

Referenced by ZSTD_execSequence(), ZSTD_execSequenceLast7(), ZSTD_execSequenceLong(), and ZSTD_storeSeq().

◆ ZSTD_wildcopy_e()

MEM_STATIC void ZSTD_wildcopy_e ( void dst,
const void src,
void dstEnd 
)

Definition at line 167 of file zstd_internal.h.

168 {
169  const BYTE* ip = (const BYTE*)src;
170  BYTE* op = (BYTE*)dst;
171  BYTE* const oend = (BYTE*)dstEnd;
172  do
173  COPY8(op, ip)
174  while (op < oend);
175 }
Definition: dhcpd.h:61
UINT op
Definition: effect.c:224
GLenum src
Definition: glext.h:6340
unsigned char BYTE
Definition: xxhash.c:193
#define COPY8(d, s)
GLenum GLenum dst
Definition: glext.h:6340

Variable Documentation

◆ LL_bits

const U32 LL_bits[MaxLL+1]
static
Initial value:
= { 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 2, 2, 3, 3,
4, 6, 7, 8, 9,10,11,12,
13,14,15,16 }

Definition at line 110 of file zstd_internal.h.

Referenced by ZSTD_decodeSeqHeaders(), ZSTD_encodeSequences_body(), ZSTD_litLengthContribution(), ZSTD_litLengthPrice(), and ZSTD_loadEntropy().

◆ LL_defaultNorm

const S16 LL_defaultNorm[MaxLL+1]
static
Initial value:
= { 4, 3, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 1, 1, 1,
2, 2, 2, 2, 2, 2, 2, 2,
2, 3, 2, 1, 1, 1, 1, 1,
-1,-1,-1,-1 }

Definition at line 115 of file zstd_internal.h.

Referenced by ZSTD_compressSequences_internal().

◆ LL_defaultNormLog

const U32 LL_defaultNormLog = LL_DEFAULTNORMLOG
static

Definition at line 121 of file zstd_internal.h.

Referenced by ZSTD_compressSequences_internal().

◆ ML_bits

const U32 ML_bits[MaxML+1]
static
Initial value:
= { 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 2, 2, 3, 3,
4, 4, 5, 7, 8, 9,10,11,
12,13,14,15,16 }

Definition at line 123 of file zstd_internal.h.

Referenced by ZSTD_decodeSeqHeaders(), ZSTD_encodeSequences_body(), ZSTD_getMatchPrice(), and ZSTD_loadEntropy().

◆ ML_defaultNorm

const S16 ML_defaultNorm[MaxML+1]
static
Initial value:
= { 1, 4, 3, 2, 2, 2, 2, 2,
2, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1,-1,-1,
-1,-1,-1,-1,-1 }

Definition at line 130 of file zstd_internal.h.

Referenced by ZSTD_compressSequences_internal().

◆ ML_defaultNormLog

const U32 ML_defaultNormLog = ML_DEFAULTNORMLOG
static

Definition at line 138 of file zstd_internal.h.

Referenced by ZSTD_compressSequences_internal().

◆ OF_defaultNorm

const S16 OF_defaultNorm[DefaultMaxOff+1]
static
Initial value:
= { 1, 1, 1, 1, 1, 1, 2, 2,
2, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
-1,-1,-1,-1,-1 }

Definition at line 140 of file zstd_internal.h.

Referenced by ZSTD_compressSequences_internal().

◆ OF_defaultNormLog

const U32 OF_defaultNormLog = OF_DEFAULTNORMLOG
static

Definition at line 145 of file zstd_internal.h.

Referenced by ZSTD_compressSequences_internal().

◆ repStartValue

const U32 repStartValue[ZSTD_REP_NUM] = { 1, 4, 8 }
static

Definition at line 64 of file zstd_internal.h.

Referenced by ZSTD_decompressBegin(), and ZSTD_reset_compressedBlockState().

◆ ZSTD_blockHeaderSize

◆ ZSTD_did_fieldSize

const size_t ZSTD_did_fieldSize[4] = { 0, 1, 2, 4 }
static

Definition at line 80 of file zstd_internal.h.

Referenced by ZSTD_frameHeaderSize_internal().

◆ ZSTD_fcs_fieldSize

const size_t ZSTD_fcs_fieldSize[4] = { 0, 2, 4, 8 }
static

Definition at line 79 of file zstd_internal.h.

Referenced by ZSTD_frameHeaderSize_internal().