ReactOS  0.4.15-dev-5500-g82cf6c2
zstd_ddict.h File Reference
#include <stddef.h>
#include "zstd.h"
Include dependency graph for zstd_ddict.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

const voidZSTD_DDict_dictContent (const ZSTD_DDict *ddict)
 
size_t ZSTD_DDict_dictSize (const ZSTD_DDict *ddict)
 
void ZSTD_copyDDictParameters (ZSTD_DCtx *dctx, const ZSTD_DDict *ddict)
 

Function Documentation

◆ ZSTD_copyDDictParameters()

void ZSTD_copyDDictParameters ( ZSTD_DCtx dctx,
const ZSTD_DDict ddict 
)

Definition at line 58 of file zstd_ddict.c.

59 {
60  DEBUGLOG(4, "ZSTD_copyDDictParameters");
61  assert(dctx != NULL);
62  assert(ddict != NULL);
63  dctx->dictID = ddict->dictID;
64  dctx->prefixStart = ddict->dictContent;
65  dctx->virtualStart = ddict->dictContent;
66  dctx->dictEnd = (const BYTE*)ddict->dictContent + ddict->dictSize;
67  dctx->previousDstEnd = dctx->dictEnd;
68 #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
69  dctx->dictContentBeginForFuzzing = dctx->prefixStart;
70  dctx->dictContentEndForFuzzing = dctx->previousDstEnd;
71 #endif
72  if (ddict->entropyPresent) {
73  dctx->litEntropy = 1;
74  dctx->fseEntropy = 1;
75  dctx->LLTptr = ddict->entropy.LLTable;
76  dctx->MLTptr = ddict->entropy.MLTable;
77  dctx->OFTptr = ddict->entropy.OFTable;
78  dctx->HUFptr = ddict->entropy.hufTable;
79  dctx->entropy.rep[0] = ddict->entropy.rep[0];
80  dctx->entropy.rep[1] = ddict->entropy.rep[1];
81  dctx->entropy.rep[2] = ddict->entropy.rep[2];
82  } else {
83  dctx->litEntropy = 0;
84  dctx->fseEntropy = 0;
85  }
86 }
const void * previousDstEnd
const void * dictContent
Definition: zstd_ddict.c:38
ZSTD_entropyDTables_t entropy
Definition: zstd_ddict.c:40
const ZSTD_seqSymbol * OFTptr
#define assert(x)
Definition: debug.h:53
ZSTD_seqSymbol OFTable[SEQSYMBOL_TABLE_SIZE(OffFSELog)]
if(dx==0 &&dy==0)
Definition: linetemp.h:174
U32 entropyPresent
Definition: zstd_ddict.c:42
#define DEBUGLOG(l,...)
Definition: debug.h:106
const void * virtualStart
const void * prefixStart
const ZSTD_seqSymbol * LLTptr
const ZSTD_seqSymbol * MLTptr
ZSTD_entropyDTables_t entropy
ZSTD_seqSymbol MLTable[SEQSYMBOL_TABLE_SIZE(MLFSELog)]
size_t dictSize
Definition: zstd_ddict.c:39
HUF_DTable hufTable[HUF_DTABLE_SIZE(HufLog)]
unsigned char BYTE
Definition: xxhash.c:193
ZSTD_seqSymbol LLTable[SEQSYMBOL_TABLE_SIZE(LLFSELog)]
#define NULL
Definition: types.h:112
const HUF_DTable * HUFptr

Referenced by ZSTD_decompressBegin_usingDDict().

◆ ZSTD_DDict_dictContent()

const void* ZSTD_DDict_dictContent ( const ZSTD_DDict ddict)

Definition at line 46 of file zstd_ddict.c.

47 {
48  assert(ddict != NULL);
49  return ddict->dictContent;
50 }
const void * dictContent
Definition: zstd_ddict.c:38
#define assert(x)
Definition: debug.h:53
#define NULL
Definition: types.h:112

Referenced by ZSTD_decompressBegin_usingDDict(), ZSTD_decompressMultiFrame(), and ZSTD_decompressStream().

◆ ZSTD_DDict_dictSize()

size_t ZSTD_DDict_dictSize ( const ZSTD_DDict ddict)

Definition at line 52 of file zstd_ddict.c.

53 {
54  assert(ddict != NULL);
55  return ddict->dictSize;
56 }
#define assert(x)
Definition: debug.h:53
size_t dictSize
Definition: zstd_ddict.c:39
#define NULL
Definition: types.h:112

Referenced by ZSTD_decompressBegin_usingDDict(), ZSTD_decompressMultiFrame(), and ZSTD_decompressStream().