ReactOS 0.4.16-dev-38-g96c65e9
|
#include "compiler.h"
#include "mem.h"
#include "debug.h"
#include "error_private.h"
#include "zstd.h"
#include "fse.h"
#include "huf.h"
#include "../xxhash.h"
Go to the source code of this file.
Classes | |
struct | seqDef_s |
struct | seqStore_t |
struct | ZSTD_sequenceLength |
struct | ZSTD_frameSizeInfo |
struct | blockProperties_t |
Typedefs | |
typedef struct seqDef_s | seqDef |
Enumerations | |
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 } |
Variables | |
static const U32 | repStartValue [ZSTD_REP_NUM] = { 1, 4, 8 } |
static const size_t | ZSTD_fcs_fieldSize [4] = { 0, 2, 4, 8 } |
static const size_t | ZSTD_did_fieldSize [4] = { 0, 1, 2, 4 } |
static const size_t | ZSTD_blockHeaderSize = ZSTD_BLOCKHEADERSIZE |
static const U32 | LL_bits [MaxLL+1] |
static const S16 | LL_defaultNorm [MaxLL+1] |
static const U32 | LL_defaultNormLog = LL_DEFAULTNORMLOG |
static const U32 | ML_bits [MaxML+1] |
static const S16 | ML_defaultNorm [MaxML+1] |
static const U32 | ML_defaultNormLog = ML_DEFAULTNORMLOG |
static const S16 | OF_defaultNorm [DefaultMaxOff+1] |
static const U32 | OF_defaultNormLog = OF_DEFAULTNORMLOG |
#define _FORCE_HAS_FORMAT_STRING | ( | ... | ) |
Ignore: this is an internal helper.
We want to force this function invocation to be syntactically correct, but we don't want to force runtime evaluation of its arguments.
Definition at line 79 of file zstd_internal.h.
#define BIT0 1 |
Definition at line 153 of file zstd_internal.h.
#define BIT1 2 |
Definition at line 152 of file zstd_internal.h.
#define BIT4 16 |
Definition at line 151 of file zstd_internal.h.
#define BIT5 32 |
Definition at line 150 of file zstd_internal.h.
#define BIT6 64 |
Definition at line 149 of file zstd_internal.h.
#define BIT7 128 |
Definition at line 148 of file zstd_internal.h.
Definition at line 246 of file zstd_internal.h.
Definition at line 238 of file zstd_internal.h.
#define DefaultMaxOff 28 |
Definition at line 181 of file zstd_internal.h.
If the provided expression evaluates to an error code, returns that error code.
In debug modes, prints additional information.
Definition at line 121 of file zstd_internal.h.
#define FSE_isError ERR_isError |
Definition at line 47 of file zstd_internal.h.
#define FSE_STATIC_LINKING_ONLY |
Definition at line 31 of file zstd_internal.h.
Definition at line 146 of file zstd_internal.h.
#define HUF_isError ERR_isError |
Definition at line 48 of file zstd_internal.h.
#define HUF_STATIC_LINKING_ONLY |
Definition at line 33 of file zstd_internal.h.
#define HufLog 12 |
Definition at line 170 of file zstd_internal.h.
#define KB *(1 <<10) |
Definition at line 144 of file zstd_internal.h.
#define Litbits 8 |
Definition at line 177 of file zstd_internal.h.
Definition at line 199 of file zstd_internal.h.
#define LLFSELog 9 |
Definition at line 185 of file zstd_internal.h.
#define LONGNBSEQ 0x7F00 |
Definition at line 173 of file zstd_internal.h.
Definition at line 187 of file zstd_internal.h.
Definition at line 178 of file zstd_internal.h.
#define MaxLL 35 |
Definition at line 180 of file zstd_internal.h.
#define MaxML 52 |
Definition at line 179 of file zstd_internal.h.
#define MaxOff 31 |
Definition at line 182 of file zstd_internal.h.
Definition at line 183 of file zstd_internal.h.
#define MB *(1 <<20) |
Definition at line 145 of file zstd_internal.h.
#define MIN_CBLOCK_SIZE (1 /*litCSize*/ + 1 /* RLE or RAW */ + MIN_SEQUENCES_SIZE /* nbSeq==0 */) /* for a non-null block */ |
Definition at line 168 of file zstd_internal.h.
#define MIN_SEQUENCES_SIZE 1 /* nbSeq==0 */ |
Definition at line 167 of file zstd_internal.h.
#define MINMATCH 3 |
Definition at line 175 of file zstd_internal.h.
Definition at line 216 of file zstd_internal.h.
#define MLFSELog 9 |
Definition at line 184 of file zstd_internal.h.
Definition at line 223 of file zstd_internal.h.
#define OffFSELog 8 |
Definition at line 186 of file zstd_internal.h.
Unconditionally return the specified error.
In debug modes, prints additional information.
Definition at line 106 of file zstd_internal.h.
Return the specified error if the condition evaluates to true.
In debug modes, prints additional information. In order to do that (particularly, printing the conditional that failed), this can't just wrap RETURN_ERROR().
Definition at line 91 of file zstd_internal.h.
#define WILDCOPY_OVERLENGTH 32 |
Definition at line 248 of file zstd_internal.h.
#define WILDCOPY_VECLEN 16 |
Definition at line 249 of file zstd_internal.h.
#define XXH_STATIC_LINKING_ONLY /* XXH64_state_t */ |
Definition at line 36 of file zstd_internal.h.
#define ZSTD_BLOCKHEADERSIZE 3 /* C standard doesn't allow `static const` variable to be init using another `static const` variable */ |
Definition at line 161 of file zstd_internal.h.
#define ZSTD_FRAMECHECKSUMSIZE 4 |
Definition at line 165 of file zstd_internal.h.
#define ZSTD_isError ERR_isError /* for inlining */ |
Definition at line 46 of file zstd_internal.h.
#define ZSTD_OPT_NUM (1<<12) |
Definition at line 138 of file zstd_internal.h.
#define ZSTD_REP_MOVE (ZSTD_REP_NUM-1) |
Definition at line 141 of file zstd_internal.h.
Definition at line 140 of file zstd_internal.h.
#define ZSTD_STATIC_ASSERT | ( | c | ) | DEBUG_STATIC_ASSERT(c) |
Definition at line 45 of file zstd_internal.h.
#define ZSTD_STATIC_LINKING_ONLY |
Definition at line 29 of file zstd_internal.h.
#define ZSTD_WINDOWLOG_ABSOLUTEMIN 10 |
Definition at line 155 of file zstd_internal.h.
#define ZSTD_WORKSPACETOOLARGE_FACTOR 3 |
Definition at line 314 of file zstd_internal.h.
#define ZSTD_WORKSPACETOOLARGE_MAXDURATION 128 |
Definition at line 321 of file zstd_internal.h.
Enumerator | |
---|---|
set_basic | |
set_rle | |
set_compressed | |
set_repeat |
Definition at line 171 of file zstd_internal.h.
Enumerator | |
---|---|
ZSTD_no_overlap | |
ZSTD_overlap_src_before_dst |
Definition at line 251 of file zstd_internal.h.
|
static |
Ignore: this is an internal helper.
This is a helper function to help force C99-correctness during compilation. Under strict compilation modes, variadic macro arguments can't be empty. However, variadic function arguments can be. Using a function therefore lets us statically check that at least one (string) argument was passed, independent of the compilation flags.
Definition at line 69 of file zstd_internal.h.
Definition at line 61 of file zstd_common.c.
Referenced by ZSTD_createCCtxParams_advanced().
Definition at line 239 of file zstd_internal.h.
ZSTD_decodeSeqHeaders() : decode sequence header from src
Definition at line 480 of file zstd_decompress_block.c.
Definition at line 70 of file zstd_common.c.
Referenced by ZSTD_clearAllDicts(), ZSTD_createCDict_advanced(), ZSTD_cwksp_free(), ZSTD_decompressStream(), ZSTD_freeCCtx(), ZSTD_freeCCtxParams(), ZSTD_freeCDict(), ZSTD_freeDCtx(), ZSTD_freeDDict(), and ZSTD_getSequences().
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 56 of file zstd_decompress_block.c.
Referenced by ZSTD_decompressContinue(), ZSTD_decompressFrame(), and ZSTD_findFrameSizeInfo().
const seqStore_t * ZSTD_getSeqStore | ( | const ZSTD_CCtx * | ctx | ) |
Definition at line 190 of file zstd_compress.c.
Referenced by ZSTD_copyBlockSequences().
MEM_STATIC ZSTD_sequenceLength ZSTD_getSequenceLength | ( | seqStore_t const * | seqStore, |
seqDef const * | seq | ||
) |
Returns the ZSTD_sequenceLength for the given sequences. It handles the decoding of long sequences indicated by longLengthPos and longLengthID, and adds MINMATCH back to matchLength.
Definition at line 356 of file zstd_internal.h.
Referenced by ZSTD_compressSubBlock_multi(), and ZSTD_seqDecompressedSize().
MEM_STATIC U32 ZSTD_highbit32 | ( | U32 | val | ) |
Definition at line 392 of file zstd_internal.h.
Referenced by ZSTD_adjustCParams_internal(), ZSTD_bitWeight(), ZSTD_compressBegin_usingCDict_advanced(), ZSTD_compressBlock_lazy_extDict_generic(), ZSTD_compressBlock_lazy_generic(), ZSTD_DUBT_findBestMatch(), ZSTD_DUBT_findBetterDictMatch(), ZSTD_fracWeight(), ZSTD_getMatchPrice(), ZSTD_loadZstdDictionary(), ZSTD_seqToCodes(), and ZSTD_updateStats().
Definition at line 1593 of file zstd_compress.c.
MEM_STATIC size_t ZSTD_limitCopy | ( | void * | dst, |
size_t | dstCapacity, | ||
const void * | src, | ||
size_t | srcSize | ||
) |
Definition at line 304 of file zstd_internal.h.
Referenced by ZSTD_compressStream_generic(), and ZSTD_decompressStream().
Definition at line 56 of file zstd_common.c.
Referenced by ZSTD_CCtx_loadDictionary_advanced(), ZSTD_createCCtx_advanced(), ZSTD_createCDict_advanced(), ZSTD_createDCtx_advanced(), ZSTD_createDDict_advanced(), ZSTD_cwksp_create(), ZSTD_decompressStream(), ZSTD_getSequences(), and ZSTD_initDDict_internal().
void ZSTD_seqToCodes | ( | const seqStore_t * | seqStorePtr | ) |
Definition at line 1929 of file zstd_compress.c.
Referenced by ZSTD_buildSuperBlockEntropy_sequences(), and ZSTD_compressSequences_internal().
MEM_STATIC FORCE_INLINE_ATTR void ZSTD_wildcopy | ( | void * | dst, |
const void * | src, | ||
ptrdiff_t | length, | ||
ZSTD_overlap_e const | ovtype | ||
) |
ZSTD_wildcopy() : Custom version of memcpy(), can over read/write up to WILDCOPY_OVERLENGTH bytes (if length==0)
ovtype | controls the overlap detection
|
Definition at line 265 of file zstd_internal.h.
Referenced by ZSTD_safecopyLiterals().
Definition at line 189 of file zstd_internal.h.
Referenced by ZSTD_encodeSequences_body(), ZSTD_estimateSubBlockSize_sequences(), ZSTD_litLengthPrice(), and ZSTD_loadDEntropy().
Definition at line 194 of file zstd_internal.h.
Referenced by ZSTD_buildSuperBlockEntropy_sequences(), ZSTD_compressSequences_internal(), and ZSTD_estimateSubBlockSize_sequences().
|
static |
Definition at line 200 of file zstd_internal.h.
Referenced by ZSTD_buildSuperBlockEntropy_sequences(), ZSTD_compressSequences_internal(), and ZSTD_estimateSubBlockSize_sequences().
Definition at line 202 of file zstd_internal.h.
Referenced by ZSTD_encodeSequences_body(), ZSTD_estimateSubBlockSize_sequences(), ZSTD_getMatchPrice(), and ZSTD_loadDEntropy().
Definition at line 209 of file zstd_internal.h.
Referenced by ZSTD_buildSuperBlockEntropy_sequences(), ZSTD_compressSequences_internal(), and ZSTD_estimateSubBlockSize_sequences().
|
static |
Definition at line 217 of file zstd_internal.h.
Referenced by ZSTD_buildSuperBlockEntropy_sequences(), ZSTD_compressSequences_internal(), and ZSTD_estimateSubBlockSize_sequences().
|
static |
Definition at line 219 of file zstd_internal.h.
Referenced by ZSTD_buildSuperBlockEntropy_sequences(), ZSTD_compressSequences_internal(), and ZSTD_estimateSubBlockSize_sequences().
|
static |
Definition at line 224 of file zstd_internal.h.
Referenced by ZSTD_buildSuperBlockEntropy_sequences(), ZSTD_compressSequences_internal(), and ZSTD_estimateSubBlockSize_sequences().
|
static |
Definition at line 142 of file zstd_internal.h.
Referenced by ZSTD_copyBlockSequences(), ZSTD_decompressBegin(), and ZSTD_reset_compressedBlockState().
|
static |
Definition at line 162 of file zstd_internal.h.
Referenced by ZSTD_buildSeqStore(), ZSTD_compress_frameChunk(), ZSTD_compressBlock_targetCBlockSize_body(), ZSTD_compressSubBlock(), ZSTD_CStreamOutSize(), ZSTD_decompressContinue(), ZSTD_decompressFrame(), ZSTD_decompressStream(), ZSTD_DStreamInSize(), ZSTD_estimateSubBlockSize(), ZSTD_findFrameSizeInfo(), ZSTD_getcBlockSize(), ZSTD_writeEpilogue(), and ZSTD_writeLastEmptyBlock().
Definition at line 157 of file zstd_internal.h.
Referenced by ZSTD_frameHeaderSize_internal().
Definition at line 156 of file zstd_internal.h.
Referenced by ZSTD_frameHeaderSize_internal().