Project Alice
Loading...
Searching...
No Matches
zstd_ddict.c File Reference
#include "../common/allocations.h"
#include "../common/zstd_deps.h"
#include "../common/cpu.h"
#include "../common/mem.h"
#include "../common/fse.h"
#include "../common/huf.h"
#include "zstd_decompress_internal.h"
#include "zstd_ddict.h"
Include dependency graph for zstd_ddict.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ZSTD_DDict_s
 

Macros

#define FSE_STATIC_LINKING_ONLY
 

Functions

const void * ZSTD_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)
 
ZSTD_DDictZSTD_createDDict_advanced (const void *dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType, ZSTD_customMem customMem)
 
ZSTD_DDictZSTD_createDDict (const void *dict, size_t dictSize)
 
ZSTD_DDictZSTD_createDDict_byReference (const void *dictBuffer, size_t dictSize)
 
const ZSTD_DDictZSTD_initStaticDDict (void *sBuffer, size_t sBufferSize, const void *dict, size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod, ZSTD_dictContentType_e dictContentType)
 
size_t ZSTD_freeDDict (ZSTD_DDict *ddict)
 
size_t ZSTD_estimateDDictSize (size_t dictSize, ZSTD_dictLoadMethod_e dictLoadMethod)
 
size_t ZSTD_sizeof_DDict (const ZSTD_DDict *ddict)
 
unsigned ZSTD_getDictID_fromDDict (const ZSTD_DDict *ddict)
 

Macro Definition Documentation

◆ FSE_STATIC_LINKING_ONLY

#define FSE_STATIC_LINKING_ONLY

Definition at line 21 of file zstd_ddict.c.

Function Documentation

◆ ZSTD_copyDDictParameters()

void ZSTD_copyDDictParameters ( ZSTD_DCtx dctx,
const ZSTD_DDict ddict 
)

Definition at line 58 of file zstd_ddict.c.

Here is the caller graph for this function:

◆ ZSTD_createDDict()

ZSTD_DDict * ZSTD_createDDict ( const void *  dict,
size_t  dictSize 
)

ZSTD_createDDict() : Create a digested dictionary, to start decompression without startup delay. dict content is copied inside DDict. Consequently, dict can be released after ZSTD_DDict creation

Definition at line 170 of file zstd_ddict.c.

Here is the call graph for this function:

◆ ZSTD_createDDict_advanced()

ZSTD_DDict * ZSTD_createDDict_advanced ( const void *  dict,
size_t  dictSize,
ZSTD_dictLoadMethod_e  dictLoadMethod,
ZSTD_dictContentType_e  dictContentType,
ZSTD_customMem  customMem 
)

Definition at line 145 of file zstd_ddict.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_createDDict_byReference()

ZSTD_DDict * ZSTD_createDDict_byReference ( const void *  dictBuffer,
size_t  dictSize 
)

ZSTD_createDDict_byReference() : Create a digested dictionary, to start decompression without startup delay. Dictionary content is simply referenced, it will be accessed during decompression. Warning : dictBuffer must outlive DDict (DDict must be freed before dictBuffer)

Definition at line 180 of file zstd_ddict.c.

Here is the call graph for this function:

◆ ZSTD_DDict_dictContent()

const void * ZSTD_DDict_dictContent ( const ZSTD_DDict ddict)

Definition at line 46 of file zstd_ddict.c.

Here is the caller graph for this function:

◆ ZSTD_DDict_dictSize()

size_t ZSTD_DDict_dictSize ( const ZSTD_DDict ddict)

Definition at line 52 of file zstd_ddict.c.

Here is the caller graph for this function:

◆ ZSTD_estimateDDictSize()

size_t ZSTD_estimateDDictSize ( size_t  dictSize,
ZSTD_dictLoadMethod_e  dictLoadMethod 
)

ZSTD_estimateDDictSize() : Estimate amount of memory that will be needed to create a dictionary for decompression. Note : dictionary created by reference using ZSTD_dlm_byRef are smaller

Definition at line 225 of file zstd_ddict.c.

◆ ZSTD_freeDDict()

size_t ZSTD_freeDDict ( ZSTD_DDict ddict)

ZSTD_freeDDict() : Function frees memory allocated with ZSTD_createDDict() If a NULL pointer is passed, no operation is performed.

Definition at line 212 of file zstd_ddict.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ZSTD_getDictID_fromDDict()

unsigned ZSTD_getDictID_fromDDict ( const ZSTD_DDict ddict)

ZSTD_getDictID_fromDDict() : Provides the dictID of the dictionary loaded into ddict. If

Returns
== 0, the dictionary is not conformant to Zstandard specification, or empty. Non-conformant dictionaries can still be loaded, but as content-only dictionaries.

Definition at line 240 of file zstd_ddict.c.

◆ ZSTD_initStaticDDict()

const ZSTD_DDict * ZSTD_initStaticDDict ( void *  sBuffer,
size_t  sBufferSize,
const void *  dict,
size_t  dictSize,
ZSTD_dictLoadMethod_e  dictLoadMethod,
ZSTD_dictContentType_e  dictContentType 
)

Definition at line 187 of file zstd_ddict.c.

◆ ZSTD_sizeof_DDict()

size_t ZSTD_sizeof_DDict ( const ZSTD_DDict ddict)

Definition at line 230 of file zstd_ddict.c.