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

Go to the source code of this file.

Classes

struct  seq_t
 
struct  ZSTD_fseState
 
struct  seqState_t
 
struct  ZSTD_OffsetInfo
 

Macros

#define FSE_STATIC_LINKING_ONLY
 
#define LONG_OFFSETS_MAX_EXTRA_BITS_32
 
#define STORED_SEQS   8
 
#define STORED_SEQS_MASK   (STORED_SEQS-1)
 
#define ADVANCED_SEQS   STORED_SEQS
 

Typedefs

typedef size_t(* ZSTD_decompressSequences_t) (ZSTD_DCtx *dctx, void *dst, size_t maxDstSize, const void *seqStart, size_t seqSize, int nbSeq, const ZSTD_longOffset_e isLongOffset)
 

Enumerations

enum  ZSTD_longOffset_e { ZSTD_lo_isRegularOffset , ZSTD_lo_isLongOffset =1 }
 

Functions

size_t ZSTD_getcBlockSize (const void *src, size_t srcSize, blockProperties_t *bpPtr)
 
size_t ZSTD_decodeLiteralsBlock_wrapper (ZSTD_DCtx *dctx, const void *src, size_t srcSize, void *dst, size_t dstCapacity)
 
FORCE_INLINE_TEMPLATE void ZSTD_buildFSETable_body (ZSTD_seqSymbol *dt, const short *normalizedCounter, unsigned maxSymbolValue, const U32 *baseValue, const U8 *nbAdditionalBits, unsigned tableLog, void *wksp, size_t wkspSize)
 
void ZSTD_buildFSETable (ZSTD_seqSymbol *dt, const short *normalizedCounter, unsigned maxSymbolValue, const U32 *baseValue, const U8 *nbAdditionalBits, unsigned tableLog, void *wksp, size_t wkspSize, int bmi2)
 
size_t ZSTD_decodeSeqHeaders (ZSTD_DCtx *dctx, int *nbSeqPtr, const void *src, size_t srcSize)
 
HINT_INLINE void ZSTD_overlapCopy8 (BYTE **op, BYTE const **ip, size_t offset)
 
FORCE_NOINLINE ZSTD_ALLOW_POINTER_OVERFLOW_ATTR size_t ZSTD_execSequenceEnd (BYTE *op, BYTE *const oend, seq_t sequence, const BYTE **litPtr, const BYTE *const litLimit, const BYTE *const prefixStart, const BYTE *const virtualStart, const BYTE *const dictEnd)
 
FORCE_NOINLINE ZSTD_ALLOW_POINTER_OVERFLOW_ATTR size_t ZSTD_execSequenceEndSplitLitBuffer (BYTE *op, BYTE *const oend, const BYTE *const oend_w, seq_t sequence, const BYTE **litPtr, const BYTE *const litLimit, const BYTE *const prefixStart, const BYTE *const virtualStart, const BYTE *const dictEnd)
 
HINT_INLINE ZSTD_ALLOW_POINTER_OVERFLOW_ATTR size_t ZSTD_execSequence (BYTE *op, BYTE *const oend, seq_t sequence, const BYTE **litPtr, const BYTE *const litLimit, const BYTE *const prefixStart, const BYTE *const virtualStart, const BYTE *const dictEnd)
 
HINT_INLINE ZSTD_ALLOW_POINTER_OVERFLOW_ATTR size_t ZSTD_execSequenceSplitLitBuffer (BYTE *op, BYTE *const oend, const BYTE *const oend_w, seq_t sequence, const BYTE **litPtr, const BYTE *const litLimit, const BYTE *const prefixStart, const BYTE *const virtualStart, const BYTE *const dictEnd)
 
FORCE_INLINE_TEMPLATE void ZSTD_updateFseStateWithDInfo (ZSTD_fseState *DStatePtr, BIT_DStream_t *bitD, U16 nextState, U32 nbBits)
 
FORCE_INLINE_TEMPLATE seq_t ZSTD_decodeSequence (seqState_t *seqState, const ZSTD_longOffset_e longOffsets, const int isLastSeq)
 
FORCE_INLINE_TEMPLATE size_t DONT_VECTORIZE ZSTD_decompressSequences_bodySplitLitBuffer (ZSTD_DCtx *dctx, void *dst, size_t maxDstSize, const void *seqStart, size_t seqSize, int nbSeq, const ZSTD_longOffset_e isLongOffset)
 
FORCE_INLINE_TEMPLATE size_t DONT_VECTORIZE ZSTD_decompressSequences_body (ZSTD_DCtx *dctx, void *dst, size_t maxDstSize, const void *seqStart, size_t seqSize, int nbSeq, const ZSTD_longOffset_e isLongOffset)
 
FORCE_INLINE_TEMPLATE size_t ZSTD_prefetchMatch (size_t prefetchPos, seq_t const sequence, const BYTE *const prefixStart, const BYTE *const dictEnd)
 
FORCE_INLINE_TEMPLATE size_t ZSTD_decompressSequencesLong_body (ZSTD_DCtx *dctx, void *dst, size_t maxDstSize, const void *seqStart, size_t seqSize, int nbSeq, const ZSTD_longOffset_e isLongOffset)
 
size_t ZSTD_decompressBlock_internal (ZSTD_DCtx *dctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize, const streaming_operation streaming)
 
ZSTD_ALLOW_POINTER_OVERFLOW_ATTR void ZSTD_checkContinuity (ZSTD_DCtx *dctx, const void *dst, size_t dstSize)
 
size_t ZSTD_decompressBlock_deprecated (ZSTD_DCtx *dctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize)
 
size_t ZSTD_decompressBlock (ZSTD_DCtx *dctx, void *dst, size_t dstCapacity, const void *src, size_t srcSize)
 

Macro Definition Documentation

◆ ADVANCED_SEQS

#define ADVANCED_SEQS   STORED_SEQS

◆ FSE_STATIC_LINKING_ONLY

#define FSE_STATIC_LINKING_ONLY

Definition at line 21 of file zstd_decompress_block.c.

◆ LONG_OFFSETS_MAX_EXTRA_BITS_32

#define LONG_OFFSETS_MAX_EXTRA_BITS_32
Value:
(ZSTD_WINDOWLOG_MAX_32 > STREAM_ACCUMULATOR_MIN_32 \
? ZSTD_WINDOWLOG_MAX_32 - STREAM_ACCUMULATOR_MIN_32 \
: 0)
#define STREAM_ACCUMULATOR_MIN_32
Definition: bitstream.h:47

Definition at line 1215 of file zstd_decompress_block.c.

◆ STORED_SEQS

#define STORED_SEQS   8

◆ STORED_SEQS_MASK

#define STORED_SEQS_MASK   (STORED_SEQS-1)

Typedef Documentation

◆ ZSTD_decompressSequences_t

typedef size_t(* ZSTD_decompressSequences_t) (ZSTD_DCtx *dctx, void *dst, size_t maxDstSize, const void *seqStart, size_t seqSize, int nbSeq, const ZSTD_longOffset_e isLongOffset)

Definition at line 1938 of file zstd_decompress_block.c.

Enumeration Type Documentation

◆ ZSTD_longOffset_e

Enumerator
ZSTD_lo_isRegularOffset 
ZSTD_lo_isLongOffset 

Definition at line 1220 of file zstd_decompress_block.c.

Function Documentation

◆ ZSTD_buildFSETable()

void ZSTD_buildFSETable ( ZSTD_seqSymbol dt,
const short *  normalizedCounter,
unsigned  maxSymbolValue,
const U32 baseValue,
const U8 nbAdditionalBits,
unsigned  tableLog,
void *  wksp,
size_t  wkspSize,
int  bmi2 
)

Definition at line 626 of file zstd_decompress_block.c.

◆ ZSTD_buildFSETable_body()

FORCE_INLINE_TEMPLATE void ZSTD_buildFSETable_body ( ZSTD_seqSymbol dt,
const short *  normalizedCounter,
unsigned  maxSymbolValue,
const U32 baseValue,
const U8 nbAdditionalBits,
unsigned  tableLog,
void *  wksp,
size_t  wkspSize 
)

Definition at line 485 of file zstd_decompress_block.c.

◆ ZSTD_checkContinuity()

ZSTD_ALLOW_POINTER_OVERFLOW_ATTR 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_decodeLiteralsBlock_wrapper()

size_t ZSTD_decodeLiteralsBlock_wrapper ( ZSTD_DCtx dctx,
const void *  src,
size_t  srcSize,
void *  dst,
size_t  dstCapacity 
)

Definition at line 346 of file zstd_decompress_block.c.

◆ ZSTD_decodeSeqHeaders()

size_t ZSTD_decodeSeqHeaders ( ZSTD_DCtx dctx,
int *  nbSeqPtr,
const void *  src,
size_t  srcSize 
)

ZSTD_decodeSeqHeaders() : decode sequence header from src

Definition at line 695 of file zstd_decompress_block.c.

◆ ZSTD_decodeSequence()

FORCE_INLINE_TEMPLATE seq_t ZSTD_decodeSequence ( seqState_t seqState,
const ZSTD_longOffset_e  longOffsets,
const int  isLastSeq 
)

ZSTD_decodeSequence(): longOffsets : tells the decoder to reload more bit while decoding large offsets only used in 32-bit mode

Returns
: Sequence (litL + matchL + offset)

Definition at line 1229 of file zstd_decompress_block.c.

◆ ZSTD_decompressBlock()

size_t ZSTD_decompressBlock ( ZSTD_DCtx dctx,
void *  dst,
size_t  dstCapacity,
const void *  src,
size_t  srcSize 
)

Definition at line 2210 of file zstd_decompress_block.c.

◆ ZSTD_decompressBlock_deprecated()

size_t ZSTD_decompressBlock_deprecated ( ZSTD_DCtx dctx,
void *  dst,
size_t  dstCapacity,
const void *  src,
size_t  srcSize 
)

Definition at line 2195 of file zstd_decompress_block.c.

◆ ZSTD_decompressBlock_internal()

size_t ZSTD_decompressBlock_internal ( ZSTD_DCtx dctx,
void *  dst,
size_t  dstCapacity,
const void *  src,
size_t  srcSize,
const streaming_operation  streaming 
)

Definition at line 2072 of file zstd_decompress_block.c.

◆ ZSTD_decompressSequences_body()

FORCE_INLINE_TEMPLATE size_t DONT_VECTORIZE ZSTD_decompressSequences_body ( ZSTD_DCtx dctx,
void *  dst,
size_t  maxDstSize,
const void *  seqStart,
size_t  seqSize,
int  nbSeq,
const ZSTD_longOffset_e  isLongOffset 
)

Definition at line 1615 of file zstd_decompress_block.c.

◆ ZSTD_decompressSequences_bodySplitLitBuffer()

FORCE_INLINE_TEMPLATE size_t DONT_VECTORIZE ZSTD_decompressSequences_bodySplitLitBuffer ( ZSTD_DCtx dctx,
void *  dst,
size_t  maxDstSize,
const void *  seqStart,
size_t  seqSize,
int  nbSeq,
const ZSTD_longOffset_e  isLongOffset 
)

Definition at line 1403 of file zstd_decompress_block.c.

◆ ZSTD_decompressSequencesLong_body()

FORCE_INLINE_TEMPLATE size_t ZSTD_decompressSequencesLong_body ( ZSTD_DCtx dctx,
void *  dst,
size_t  maxDstSize,
const void *  seqStart,
size_t  seqSize,
int  nbSeq,
const ZSTD_longOffset_e  isLongOffset 
)

Definition at line 1733 of file zstd_decompress_block.c.

◆ ZSTD_execSequence()

HINT_INLINE ZSTD_ALLOW_POINTER_OVERFLOW_ATTR size_t ZSTD_execSequence ( BYTE op,
BYTE *const  oend,
seq_t  sequence,
const BYTE **  litPtr,
const BYTE *const  litLimit,
const BYTE *const  prefixStart,
const BYTE *const  virtualStart,
const BYTE *const  dictEnd 
)

Definition at line 1001 of file zstd_decompress_block.c.

◆ ZSTD_execSequenceEnd()

FORCE_NOINLINE ZSTD_ALLOW_POINTER_OVERFLOW_ATTR size_t ZSTD_execSequenceEnd ( BYTE op,
BYTE *const  oend,
seq_t  sequence,
const BYTE **  litPtr,
const BYTE *const  litLimit,
const BYTE *const  prefixStart,
const BYTE *const  virtualStart,
const BYTE *const  dictEnd 
)

Definition at line 907 of file zstd_decompress_block.c.

◆ ZSTD_execSequenceEndSplitLitBuffer()

FORCE_NOINLINE ZSTD_ALLOW_POINTER_OVERFLOW_ATTR size_t ZSTD_execSequenceEndSplitLitBuffer ( BYTE op,
BYTE *const  oend,
const BYTE *const  oend_w,
seq_t  sequence,
const BYTE **  litPtr,
const BYTE *const  litLimit,
const BYTE *const  prefixStart,
const BYTE *const  virtualStart,
const BYTE *const  dictEnd 
)

Definition at line 955 of file zstd_decompress_block.c.

◆ ZSTD_execSequenceSplitLitBuffer()

HINT_INLINE ZSTD_ALLOW_POINTER_OVERFLOW_ATTR size_t ZSTD_execSequenceSplitLitBuffer ( BYTE op,
BYTE *const  oend,
const BYTE *const  oend_w,
seq_t  sequence,
const BYTE **  litPtr,
const BYTE *const  litLimit,
const BYTE *const  prefixStart,
const BYTE *const  virtualStart,
const BYTE *const  dictEnd 
)

Definition at line 1100 of file zstd_decompress_block.c.

◆ 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 63 of file zstd_decompress_block.c.

Here is the call graph for this function:

◆ ZSTD_overlapCopy8()

HINT_INLINE void ZSTD_overlapCopy8 ( BYTE **  op,
BYTE const **  ip,
size_t  offset 
)

ZSTD_overlapCopy8() : Copies 8 bytes from ip to op and updates op and ip where ip <= op. If the offset is < 8 then the offset is spread to at least 8 bytes.

Precondition: *ip <= *op Postcondition: *op - *op >= 8

Definition at line 804 of file zstd_decompress_block.c.

◆ ZSTD_prefetchMatch()

FORCE_INLINE_TEMPLATE size_t ZSTD_prefetchMatch ( size_t  prefetchPos,
seq_t const  sequence,
const BYTE *const  prefixStart,
const BYTE *const  dictEnd 
)

Definition at line 1715 of file zstd_decompress_block.c.

◆ ZSTD_updateFseStateWithDInfo()

FORCE_INLINE_TEMPLATE void ZSTD_updateFseStateWithDInfo ( ZSTD_fseState DStatePtr,
BIT_DStream_t bitD,
U16  nextState,
U32  nbBits 
)

Definition at line 1204 of file zstd_decompress_block.c.