#include "compiler.h"
#include "cpu.h"
#include "mem.h"
#include "debug.h"
#include "error_private.h"
#include "../zstd.h"
#include "fse.h"
#include "huf.h"
#include "xxhash.h"
#include "zstd_trace.h"
Go to the source code of this file.
|
#define | ZSTD_STATIC_LINKING_ONLY |
|
#define | FSE_STATIC_LINKING_ONLY |
|
#define | XXH_STATIC_LINKING_ONLY /* XXH64_state_t */ |
|
#define | ZSTD_STATIC_ASSERT(c) |
|
#define | ZSTD_isError ERR_isError /* for inlining */ |
|
#define | FSE_isError ERR_isError |
|
#define | HUF_isError ERR_isError |
|
#define | MIN(a, b) |
|
#define | MAX(a, b) |
|
#define | BOUNDED(min, val, max) |
|
#define | ZSTD_OPT_NUM (1<<12) |
|
#define | ZSTD_REP_NUM 3 /* number of repcodes */ |
|
#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_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 | ZSTD_FRAMECHECKSUMSIZE 4 |
|
#define | MIN_SEQUENCES_SIZE 1 /* nbSeq==0 */ |
|
#define | MIN_CBLOCK_SIZE (1 /*litCSize*/ + 1 /* RLE or RAW */) /* for a non-null block */ |
|
#define | MIN_LITERALS_FOR_4_STREAMS 6 |
|
#define | LONGNBSEQ 0x7F00 |
|
#define | MINMATCH 3 |
|
#define | Litbits 8 |
|
#define | LitHufLog 11 |
|
#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 | MaxMLBits 16 |
|
#define | MaxLLBits 16 |
|
#define | ZSTD_MAX_HUF_HEADER_SIZE 128 /* header + <= 127 byte tree description */ |
|
#define | ZSTD_MAX_FSE_HEADERS_SIZE (((MaxML + 1) * MLFSELog + (MaxLL + 1) * LLFSELog + (MaxOff + 1) * OffFSELog + 7) / 8) |
|
#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) |
|
#define | COPY16(d, s) |
|
#define | WILDCOPY_OVERLENGTH 32 |
|
#define | WILDCOPY_VECLEN 16 |
|
#define | ZSTD_WORKSPACETOOLARGE_FACTOR 3 |
|
#define | ZSTD_WORKSPACETOOLARGE_MAXDURATION 128 |
|
|
enum | blockType_e { bt_raw
, bt_rle
, bt_compressed
, bt_reserved
} |
|
enum | symbolEncodingType_e { set_basic
, set_rle
, set_compressed
, set_repeat
} |
|
enum | ZSTD_overlap_e { ZSTD_no_overlap
, ZSTD_overlap_src_before_dst
} |
|
enum | ZSTD_bufferMode_e { ZSTD_bm_buffered = 0
, ZSTD_bm_stable = 1
} |
|
enum | ZSTD_longLengthType_e { ZSTD_llt_none = 0
, ZSTD_llt_literalLength = 1
, ZSTD_llt_matchLength = 2
} |
|
|
MEM_STATIC FORCE_INLINE_ATTR void | ZSTD_wildcopy (void *dst, const void *src, ptrdiff_t length, ZSTD_overlap_e const ovtype) |
|
MEM_STATIC size_t | ZSTD_limitCopy (void *dst, size_t dstCapacity, const void *src, size_t srcSize) |
|
MEM_STATIC ZSTD_sequenceLength | ZSTD_getSequenceLength (seqStore_t const *seqStore, seqDef const *seq) |
|
const seqStore_t * | ZSTD_getSeqStore (const ZSTD_CCtx *ctx) |
|
int | ZSTD_seqToCodes (const seqStore_t *seqStorePtr) |
|
void | ZSTD_invalidateRepCodes (ZSTD_CCtx *cctx) |
|
size_t | ZSTD_getcBlockSize (const void *src, size_t srcSize, blockProperties_t *bpPtr) |
|
size_t | ZSTD_decodeSeqHeaders (ZSTD_DCtx *dctx, int *nbSeqPtr, const void *src, size_t srcSize) |
|
MEM_STATIC int | ZSTD_cpuSupportsBmi2 (void) |
|
◆ BIT0
◆ BIT1
◆ BIT4
◆ BIT5
◆ BIT6
◆ BIT7
◆ BOUNDED
#define BOUNDED |
( |
| min, |
|
|
| val, |
|
|
| max ) |
Value:
#define min(a, b)
Definition compress42.c:304
#define MIN(a, b)
Definition zstd_internal.h:59
#define MAX(a, b)
Definition zstd_internal.h:60
◆ COPY16
Value:{ ZSTD_copy16(
d,s);
d+=16; s+=16; }
#define d(i)
Definition sha256.c:44
◆ COPY8
Value:{ ZSTD_copy8(
d,s);
d+=8; s+=8; }
◆ DefaultMaxOff
◆ FSE_isError
◆ FSE_STATIC_LINKING_ONLY
#define FSE_STATIC_LINKING_ONLY |
◆ GB
◆ HUF_isError
◆ KB
◆ Litbits
◆ LitHufLog
◆ LL_DEFAULTNORMLOG
#define LL_DEFAULTNORMLOG 6 /* for static allocation */ |
◆ LLFSELog
◆ LONGNBSEQ
◆ MAX
Value:
#define b(i)
Definition sha256.c:42
#define a(i)
Definition sha256.c:41
◆ MaxFSELog
◆ MaxLit
◆ MaxLL
◆ MaxLLBits
◆ MaxML
◆ MaxMLBits
◆ MaxOff
◆ MaxSeq
◆ MB
◆ MIN
◆ MIN_CBLOCK_SIZE
#define MIN_CBLOCK_SIZE (1 /*litCSize*/ + 1 /* RLE or RAW */) /* for a non-null block */ |
◆ MIN_LITERALS_FOR_4_STREAMS
#define MIN_LITERALS_FOR_4_STREAMS 6 |
◆ MIN_SEQUENCES_SIZE
#define MIN_SEQUENCES_SIZE 1 /* nbSeq==0 */ |
◆ MINMATCH
◆ ML_DEFAULTNORMLOG
#define ML_DEFAULTNORMLOG 6 /* for static allocation */ |
◆ MLFSELog
◆ OF_DEFAULTNORMLOG
#define OF_DEFAULTNORMLOG 5 /* for static allocation */ |
◆ OffFSELog
◆ WILDCOPY_OVERLENGTH
#define WILDCOPY_OVERLENGTH 32 |
◆ WILDCOPY_VECLEN
#define WILDCOPY_VECLEN 16 |
◆ XXH_STATIC_LINKING_ONLY
◆ ZSTD_BLOCKHEADERSIZE
#define ZSTD_BLOCKHEADERSIZE 3 /* C standard doesn't allow `static const` variable to be init using another `static const` variable */ |
◆ ZSTD_FRAMECHECKSUMSIZE
#define ZSTD_FRAMECHECKSUMSIZE 4 |
◆ ZSTD_FRAMEIDSIZE
#define ZSTD_FRAMEIDSIZE 4 /* magic number size */ |
◆ ZSTD_isError
◆ ZSTD_MAX_FSE_HEADERS_SIZE
◆ ZSTD_MAX_HUF_HEADER_SIZE
#define ZSTD_MAX_HUF_HEADER_SIZE 128 /* header + <= 127 byte tree description */ |
◆ ZSTD_OPT_NUM
#define ZSTD_OPT_NUM (1<<12) |
◆ ZSTD_REP_NUM
#define ZSTD_REP_NUM 3 /* number of repcodes */ |
◆ ZSTD_STATIC_ASSERT
#define ZSTD_STATIC_ASSERT |
( |
| c | ) |
|
Value:
#define c(i)
Definition sha256.c:43
#define DEBUG_STATIC_ASSERT(c)
Definition debug.h:43
◆ ZSTD_STATIC_LINKING_ONLY
#define ZSTD_STATIC_LINKING_ONLY |
◆ ZSTD_WINDOWLOG_ABSOLUTEMIN
#define ZSTD_WINDOWLOG_ABSOLUTEMIN 10 |
◆ ZSTD_WORKSPACETOOLARGE_FACTOR
#define ZSTD_WORKSPACETOOLARGE_FACTOR 3 |
◆ ZSTD_WORKSPACETOOLARGE_MAXDURATION
#define ZSTD_WORKSPACETOOLARGE_MAXDURATION 128 |
◆ seqDef
◆ blockType_e
Enumerator |
---|
bt_raw | |
bt_rle | |
bt_compressed | |
bt_reserved | |
◆ symbolEncodingType_e
Enumerator |
---|
set_basic | |
set_rle | |
set_compressed | |
set_repeat | |
◆ ZSTD_bufferMode_e
Enumerator |
---|
ZSTD_bm_buffered | |
ZSTD_bm_stable | |
◆ ZSTD_longLengthType_e
Enumerator |
---|
ZSTD_llt_none | |
ZSTD_llt_literalLength | |
ZSTD_llt_matchLength | |
◆ ZSTD_overlap_e
Enumerator |
---|
ZSTD_no_overlap | |
ZSTD_overlap_src_before_dst | |
◆ ZSTD_cpuSupportsBmi2()
- Returns
- true iff the CPU supports dynamic BMI2 dispatch.
◆ ZSTD_decodeSeqHeaders()
size_t ZSTD_decodeSeqHeaders |
( |
ZSTD_DCtx * | dctx, |
|
|
int * | nbSeqPtr, |
|
|
const void * | src, |
|
|
size_t | srcSize ) |
◆ ZSTD_getcBlockSize()
◆ ZSTD_getSeqStore()
◆ ZSTD_getSequenceLength()
Returns the ZSTD_sequenceLength for the given sequences. It handles the decoding of long sequences indicated by longLengthPos and longLengthType, and adds MINMATCH back to matchLength.
◆ ZSTD_invalidateRepCodes()
void ZSTD_invalidateRepCodes |
( |
ZSTD_CCtx * | cctx | ) |
|
◆ ZSTD_limitCopy()
MEM_STATIC size_t ZSTD_limitCopy |
( |
void * | dst, |
|
|
size_t | dstCapacity, |
|
|
const void * | src, |
|
|
size_t | srcSize ) |
◆ ZSTD_seqToCodes()
◆ ZSTD_wildcopy()
ZSTD_wildcopy() : Custom version of ZSTD_memcpy(), can over read/write up to WILDCOPY_OVERLENGTH bytes (if length==0)
- Parameters
-
ovtype | controls the overlap detection
- ZSTD_no_overlap: The source and destination are guaranteed to be at least WILDCOPY_VECLEN bytes apart.
- ZSTD_overlap_src_before_dst: The src and dst may overlap, but they MUST be at least 8 bytes apart. The src buffer must be before the dst buffer.
|