Project Alice
Loading...
Searching...
No Matches
zstd_decompress_internal.h File Reference
Include dependency graph for zstd_decompress_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ZSTD_seqSymbol_header
 
struct  ZSTD_seqSymbol
 
struct  ZSTD_entropyDTables_t
 
struct  ZSTD_DDictHashSet
 
struct  ZSTD_DCtx_s
 

Macros

#define SEQSYMBOL_TABLE_SIZE(log)   (1 + (1 << (log)))
 
#define ZSTD_BUILD_FSE_TABLE_WKSP_SIZE   (sizeof(S16) * (MaxSeq + 1) + (1u << MaxFSELog) + sizeof(U64))
 
#define ZSTD_BUILD_FSE_TABLE_WKSP_SIZE_U32   ((ZSTD_BUILD_FSE_TABLE_WKSP_SIZE + sizeof(U32) - 1) / sizeof(U32))
 
#define ZSTD_HUFFDTABLE_CAPACITY_LOG   12
 
#define ZSTD_DECODER_INTERNAL_BUFFER   (1 << 16)
 
#define ZSTD_LBMIN   64
 
#define ZSTD_LBMAX   (128 << 10)
 
#define ZSTD_LITBUFFEREXTRASIZE   BOUNDED(ZSTD_LBMIN, ZSTD_DECODER_INTERNAL_BUFFER, ZSTD_LBMAX)
 

Enumerations

enum  ZSTD_dStage {
  ZSTDds_getFrameHeaderSize , ZSTDds_decodeFrameHeader , ZSTDds_decodeBlockHeader , ZSTDds_decompressBlock ,
  ZSTDds_decompressLastBlock , ZSTDds_checkChecksum , ZSTDds_decodeSkippableHeader , ZSTDds_skipFrame
}
 
enum  ZSTD_dStreamStage {
  zdss_init =0 , zdss_loadHeader , zdss_read , zdss_load ,
  zdss_flush
}
 
enum  ZSTD_dictUses_e { ZSTD_use_indefinitely = -1 , ZSTD_dont_use = 0 , ZSTD_use_once = 1 }
 
enum  ZSTD_litLocation_e { ZSTD_not_in_dst = 0 , ZSTD_in_dst = 1 , ZSTD_split = 2 }
 

Functions

MEM_STATIC int ZSTD_DCtx_get_bmi2 (const struct ZSTD_DCtx_s *dctx)
 
size_t ZSTD_loadDEntropy (ZSTD_entropyDTables_t *entropy, const void *const dict, size_t const dictSize)
 
void ZSTD_checkContinuity (ZSTD_DCtx *dctx, const void *dst, size_t dstSize)
 

Macro Definition Documentation

◆ SEQSYMBOL_TABLE_SIZE

#define SEQSYMBOL_TABLE_SIZE (   log)    (1 + (1 << (log)))

Definition at line 74 of file zstd_decompress_internal.h.

◆ ZSTD_BUILD_FSE_TABLE_WKSP_SIZE

#define ZSTD_BUILD_FSE_TABLE_WKSP_SIZE   (sizeof(S16) * (MaxSeq + 1) + (1u << MaxFSELog) + sizeof(U64))

Definition at line 76 of file zstd_decompress_internal.h.

◆ ZSTD_BUILD_FSE_TABLE_WKSP_SIZE_U32

#define ZSTD_BUILD_FSE_TABLE_WKSP_SIZE_U32   ((ZSTD_BUILD_FSE_TABLE_WKSP_SIZE + sizeof(U32) - 1) / sizeof(U32))

Definition at line 77 of file zstd_decompress_internal.h.

◆ ZSTD_DECODER_INTERNAL_BUFFER

#define ZSTD_DECODER_INTERNAL_BUFFER   (1 << 16)

Definition at line 111 of file zstd_decompress_internal.h.

◆ ZSTD_HUFFDTABLE_CAPACITY_LOG

#define ZSTD_HUFFDTABLE_CAPACITY_LOG   12

Definition at line 78 of file zstd_decompress_internal.h.

◆ ZSTD_LBMAX

#define ZSTD_LBMAX   (128 << 10)

Definition at line 115 of file zstd_decompress_internal.h.

◆ ZSTD_LBMIN

#define ZSTD_LBMIN   64

Definition at line 114 of file zstd_decompress_internal.h.

◆ ZSTD_LITBUFFEREXTRASIZE

#define ZSTD_LITBUFFEREXTRASIZE   BOUNDED(ZSTD_LBMIN, ZSTD_DECODER_INTERNAL_BUFFER, ZSTD_LBMAX)

Definition at line 118 of file zstd_decompress_internal.h.

Enumeration Type Documentation

◆ ZSTD_dictUses_e

Enumerator
ZSTD_use_indefinitely 
ZSTD_dont_use 
ZSTD_use_once 

Definition at line 97 of file zstd_decompress_internal.h.

◆ ZSTD_dStage

Enumerator
ZSTDds_getFrameHeaderSize 
ZSTDds_decodeFrameHeader 
ZSTDds_decodeBlockHeader 
ZSTDds_decompressBlock 
ZSTDds_decompressLastBlock 
ZSTDds_checkChecksum 
ZSTDds_decodeSkippableHeader 
ZSTDds_skipFrame 

Definition at line 89 of file zstd_decompress_internal.h.

◆ ZSTD_dStreamStage

Enumerator
zdss_init 
zdss_loadHeader 
zdss_read 
zdss_load 
zdss_flush 

Definition at line 94 of file zstd_decompress_internal.h.

◆ ZSTD_litLocation_e

Enumerator
ZSTD_not_in_dst 
ZSTD_in_dst 
ZSTD_split 

Definition at line 120 of file zstd_decompress_internal.h.

Function Documentation

◆ ZSTD_checkContinuity()

void ZSTD_checkContinuity ( ZSTD_DCtx dctx,
const void *  dst,
size_t  dstSize 
)

ZSTD_checkContinuity() : check if next dst follows previous position, where decompression ended. If yes, do nothing (continue on current segment). If not, classify previous segment as "external dictionary", and start a new segment. This function cannot fail.

Definition at line 2184 of file zstd_decompress_block.c.

Here is the caller graph for this function:

◆ ZSTD_DCtx_get_bmi2()

MEM_STATIC int ZSTD_DCtx_get_bmi2 ( const struct ZSTD_DCtx_s dctx)

Definition at line 213 of file zstd_decompress_internal.h.

◆ ZSTD_loadDEntropy()

size_t ZSTD_loadDEntropy ( ZSTD_entropyDTables_t entropy,
const void *const  dict,
size_t const  dictSize 
)

ZSTD_loadDEntropy() : dict : must point at beginning of a valid zstd dictionary.

Returns
: size of dictionary header (size of magic number + dict ID + entropy tables)

ZSTD_loadDEntropy() : dict : must point at beginning of a valid zstd dictionary.

Returns
: size of entropy tables read

Definition at line 1446 of file zstd_decompress.c.