ReactOS 0.4.16-dev-117-g38f21f9
|
#include <string.h>
#include "compiler.h"
#include "bitstream.h"
#include "fse.h"
#include "huf.h"
#include "error_private.h"
Go to the source code of this file.
Classes | |
struct | DTableDesc |
struct | HUF_DEltX1 |
struct | HUF_DEltX2 |
struct | sortedSymbol_t |
struct | algo_time_t |
Macros | |
#define | HUF_STATIC_LINKING_ONLY |
#define | HUF_isError ERR_isError |
#define | HUF_ALIGN(x, a) HUF_ALIGN_MASK((x), (a) - 1) |
#define | HUF_ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask)) |
#define | HUF_DGEN(fn) |
#define | HUF_DECODE_SYMBOLX1_0(ptr, DStreamPtr) *ptr++ = HUF_decodeSymbolX1(DStreamPtr, dt, dtLog) |
#define | HUF_DECODE_SYMBOLX1_1(ptr, DStreamPtr) |
#define | HUF_DECODE_SYMBOLX1_2(ptr, DStreamPtr) |
#define | HUF_DECODE_SYMBOLX2_0(ptr, DStreamPtr) ptr += HUF_decodeSymbolX2(ptr, DStreamPtr, dt, dtLog) |
#define | HUF_DECODE_SYMBOLX2_1(ptr, DStreamPtr) |
#define | HUF_DECODE_SYMBOLX2_2(ptr, DStreamPtr) |
Typedefs | |
typedef size_t(* | HUF_decompress_usingDTable_t) (void *dst, size_t dstSize, const void *cSrc, size_t cSrcSize, const HUF_DTable *DTable) |
typedef U32 | rankValCol_t[HUF_TABLELOG_MAX+1] |
typedef rankValCol_t | rankVal_t[HUF_TABLELOG_MAX] |
typedef size_t(* | decompressionAlgo) (void *dst, size_t dstSize, const void *cSrc, size_t cSrcSize) |
Variables | |
static const algo_time_t | algoTime [16][3] |
Definition at line 49 of file huf_decompress.c.
Definition at line 50 of file huf_decompress.c.
#define HUF_DECODE_SYMBOLX1_0 | ( | ptr, | |
DStreamPtr | |||
) | *ptr++ = HUF_decodeSymbolX1(DStreamPtr, dt, dtLog) |
Definition at line 203 of file huf_decompress.c.
Definition at line 206 of file huf_decompress.c.
Definition at line 210 of file huf_decompress.c.
#define HUF_DECODE_SYMBOLX2_0 | ( | ptr, | |
DStreamPtr | |||
) | ptr += HUF_decodeSymbolX2(ptr, DStreamPtr, dt, dtLog) |
Definition at line 684 of file huf_decompress.c.
Definition at line 687 of file huf_decompress.c.
Definition at line 691 of file huf_decompress.c.
Definition at line 87 of file huf_decompress.c.
#define HUF_isError ERR_isError |
Definition at line 43 of file huf_decompress.c.
#define HUF_STATIC_LINKING_ONLY |
Definition at line 22 of file huf_decompress.c.
Definition at line 1054 of file huf_decompress.c.
typedef size_t(* HUF_decompress_usingDTable_t) (void *dst, size_t dstSize, const void *cSrc, size_t cSrcSize, const HUF_DTable *DTable) |
Definition at line 357 of file huf_decompress.c.
typedef rankValCol_t rankVal_t[HUF_TABLELOG_MAX] |
Definition at line 463 of file huf_decompress.c.
typedef U32 rankValCol_t[HUF_TABLELOG_MAX+1] |
Definition at line 462 of file huf_decompress.c.
FORCE_INLINE_TEMPLATE U32 HUF_decodeLastSymbolX2 | ( | void * | op, |
BIT_DStream_t * | DStream, | ||
const HUF_DEltX2 * | dt, | ||
const U32 | dtLog | ||
) |
Definition at line 669 of file huf_decompress.c.
Referenced by HUF_decodeStreamX2().
HINT_INLINE size_t HUF_decodeStreamX1 | ( | BYTE * | p, |
BIT_DStream_t *const | bitDPtr, | ||
BYTE *const | pEnd, | ||
const HUF_DEltX1 *const | dt, | ||
const U32 | dtLog | ||
) |
Definition at line 215 of file huf_decompress.c.
Referenced by HUF_decompress1X1_usingDTable_internal_body(), and HUF_decompress4X1_usingDTable_internal_body().
HINT_INLINE size_t HUF_decodeStreamX2 | ( | BYTE * | p, |
BIT_DStream_t * | bitDPtr, | ||
BYTE *const | pEnd, | ||
const HUF_DEltX2 *const | dt, | ||
const U32 | dtLog | ||
) |
Definition at line 696 of file huf_decompress.c.
Referenced by HUF_decompress1X2_usingDTable_internal_body(), and HUF_decompress4X2_usingDTable_internal_body().
FORCE_INLINE_TEMPLATE BYTE HUF_decodeSymbolX1 | ( | BIT_DStream_t * | Dstream, |
const HUF_DEltX1 * | dt, | ||
const U32 | dtLog | ||
) |
Definition at line 195 of file huf_decompress.c.
FORCE_INLINE_TEMPLATE U32 HUF_decodeSymbolX2 | ( | void * | op, |
BIT_DStream_t * | DStream, | ||
const HUF_DEltX2 * | dt, | ||
const U32 | dtLog | ||
) |
Definition at line 660 of file huf_decompress.c.
HUF_decompress() : Decompress HUF data from buffer 'cSrc', of size 'cSrcSize', into already allocated buffer 'dst', of minimum size 'dstSize'. originalSize
: must be the exact size of original (uncompressed) data. Note : in contrast with FSE, HUF_decompress can regenerate RLE (cSrcSize==1) and uncompressed (cSrcSize==dstSize) data, because it knows size to regenerate (originalSize).
Definition at line 1056 of file huf_decompress.c.
Definition at line 400 of file huf_decompress.c.
size_t HUF_decompress1X1_DCtx | ( | HUF_DTable * | DCtx, |
void * | dst, | ||
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize | ||
) |
Definition at line 392 of file huf_decompress.c.
Referenced by HUF_decompress1X1().
size_t HUF_decompress1X1_DCtx_wksp | ( | HUF_DTable * | DCtx, |
void * | dst, | ||
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
void * | workSpace, | ||
size_t | wkspSize | ||
) |
Definition at line 377 of file huf_decompress.c.
Referenced by HUF_decompress1X1_DCtx(), and HUF_decompress1X_DCtx_wksp().
size_t HUF_decompress1X1_DCtx_wksp_bmi2 | ( | HUF_DTable * | dctx, |
void * | dst, | ||
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
void * | workSpace, | ||
size_t | wkspSize, | ||
int | bmi2 | ||
) |
Definition at line 1198 of file huf_decompress.c.
size_t HUF_decompress1X1_usingDTable | ( | void * | dst, |
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
const HUF_DTable * | DTable | ||
) |
Definition at line 367 of file huf_decompress.c.
FORCE_INLINE_TEMPLATE size_t HUF_decompress1X1_usingDTable_internal_body | ( | void * | dst, |
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
const HUF_DTable * | DTable | ||
) |
Definition at line 240 of file huf_decompress.c.
Definition at line 901 of file huf_decompress.c.
size_t HUF_decompress1X2_DCtx | ( | HUF_DTable * | DCtx, |
void * | dst, | ||
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize | ||
) |
Definition at line 893 of file huf_decompress.c.
Referenced by HUF_decompress1X2().
size_t HUF_decompress1X2_DCtx_wksp | ( | HUF_DTable * | DCtx, |
void * | dst, | ||
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
void * | workSpace, | ||
size_t | wkspSize | ||
) |
Definition at line 877 of file huf_decompress.c.
Referenced by HUF_decompress1X2_DCtx(), and HUF_decompress1X_DCtx_wksp().
size_t HUF_decompress1X2_usingDTable | ( | void * | dst, |
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
const HUF_DTable * | DTable | ||
) |
Definition at line 867 of file huf_decompress.c.
FORCE_INLINE_TEMPLATE size_t HUF_decompress1X2_usingDTable_internal_body | ( | void * | dst, |
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
const HUF_DTable * | DTable | ||
) |
Definition at line 723 of file huf_decompress.c.
size_t HUF_decompress1X_DCtx | ( | HUF_DTable * | dctx, |
void * | dst, | ||
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize | ||
) |
Definition at line 1171 of file huf_decompress.c.
size_t HUF_decompress1X_DCtx_wksp | ( | HUF_DTable * | dctx, |
void * | dst, | ||
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
void * | workSpace, | ||
size_t | wkspSize | ||
) |
Definition at line 1141 of file huf_decompress.c.
Referenced by HUF_decompress1X_DCtx().
size_t HUF_decompress1X_usingDTable | ( | void * | dst, |
size_t | maxDstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
const HUF_DTable * | DTable | ||
) |
Definition at line 961 of file huf_decompress.c.
size_t HUF_decompress1X_usingDTable_bmi2 | ( | void * | dst, |
size_t | maxDstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
const HUF_DTable * | DTable, | ||
int | bmi2 | ||
) |
Definition at line 1180 of file huf_decompress.c.
Definition at line 445 of file huf_decompress.c.
Referenced by HUF_decompress().
size_t HUF_decompress4X1_DCtx | ( | HUF_DTable * | dctx, |
void * | dst, | ||
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize | ||
) |
Definition at line 439 of file huf_decompress.c.
Referenced by HUF_decompress4X1(), and HUF_decompress4X_DCtx().
size_t HUF_decompress4X1_DCtx_wksp | ( | HUF_DTable * | dctx, |
void * | dst, | ||
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
void * | workSpace, | ||
size_t | wkspSize | ||
) |
Definition at line 431 of file huf_decompress.c.
Referenced by HUF_decompress4X1_DCtx(), and HUF_decompress4X_hufOnly_wksp().
|
static |
Definition at line 416 of file huf_decompress.c.
Referenced by HUF_decompress4X1_DCtx_wksp(), and HUF_decompress4X_hufOnly_wksp_bmi2().
size_t HUF_decompress4X1_usingDTable | ( | void * | dst, |
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
const HUF_DTable * | DTable | ||
) |
Definition at line 406 of file huf_decompress.c.
FORCE_INLINE_TEMPLATE size_t HUF_decompress4X1_usingDTable_internal_body | ( | void * | dst, |
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
const HUF_DTable * | DTable | ||
) |
Definition at line 263 of file huf_decompress.c.
Definition at line 948 of file huf_decompress.c.
Referenced by HUF_decompress().
size_t HUF_decompress4X2_DCtx | ( | HUF_DTable * | dctx, |
void * | dst, | ||
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize | ||
) |
Definition at line 940 of file huf_decompress.c.
Referenced by HUF_decompress4X2(), and HUF_decompress4X_DCtx().
size_t HUF_decompress4X2_DCtx_wksp | ( | HUF_DTable * | dctx, |
void * | dst, | ||
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
void * | workSpace, | ||
size_t | wkspSize | ||
) |
Definition at line 932 of file huf_decompress.c.
Referenced by HUF_decompress4X2_DCtx(), and HUF_decompress4X_hufOnly_wksp().
|
static |
Definition at line 917 of file huf_decompress.c.
Referenced by HUF_decompress4X2_DCtx_wksp(), and HUF_decompress4X_hufOnly_wksp_bmi2().
size_t HUF_decompress4X2_usingDTable | ( | void * | dst, |
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
const HUF_DTable * | DTable | ||
) |
Definition at line 907 of file huf_decompress.c.
FORCE_INLINE_TEMPLATE size_t HUF_decompress4X2_usingDTable_internal_body | ( | void * | dst, |
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
const HUF_DTable * | DTable | ||
) |
Definition at line 750 of file huf_decompress.c.
size_t HUF_decompress4X_DCtx | ( | HUF_DTable * | dctx, |
void * | dst, | ||
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize | ||
) |
size_t HUF_decompress4X_hufOnly | ( | HUF_DTable * | dctx, |
void * | dst, | ||
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize | ||
) |
Definition at line 1107 of file huf_decompress.c.
size_t HUF_decompress4X_hufOnly_wksp | ( | HUF_DTable * | dctx, |
void * | dst, | ||
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
void * | workSpace, | ||
size_t | wkspSize | ||
) |
Definition at line 1115 of file huf_decompress.c.
Referenced by HUF_decompress4X_hufOnly().
size_t HUF_decompress4X_hufOnly_wksp_bmi2 | ( | HUF_DTable * | dctx, |
void * | dst, | ||
size_t | dstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
void * | workSpace, | ||
size_t | wkspSize, | ||
int | bmi2 | ||
) |
Definition at line 1228 of file huf_decompress.c.
size_t HUF_decompress4X_usingDTable | ( | void * | dst, |
size_t | maxDstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
const HUF_DTable * | DTable | ||
) |
Definition at line 980 of file huf_decompress.c.
size_t HUF_decompress4X_usingDTable_bmi2 | ( | void * | dst, |
size_t | maxDstSize, | ||
const void * | cSrc, | ||
size_t | cSrcSize, | ||
const HUF_DTable * | DTable, | ||
int | bmi2 | ||
) |
Definition at line 1211 of file huf_decompress.c.
|
static |
Definition at line 509 of file huf_decompress.c.
Referenced by HUF_readDTableX2_wksp().
|
static |
Definition at line 468 of file huf_decompress.c.
Referenced by HUF_fillDTableX2().
|
static |
Definition at line 103 of file huf_decompress.c.
Referenced by HUF_decompress1X1_usingDTable(), HUF_decompress1X1_usingDTable_internal_body(), HUF_decompress1X2_usingDTable(), HUF_decompress1X2_usingDTable_internal_body(), HUF_decompress1X_usingDTable(), HUF_decompress1X_usingDTable_bmi2(), HUF_decompress4X1_usingDTable(), HUF_decompress4X1_usingDTable_internal_body(), HUF_decompress4X2_usingDTable(), HUF_decompress4X2_usingDTable_internal_body(), HUF_decompress4X_usingDTable(), HUF_decompress4X_usingDTable_bmi2(), HUF_readDTableX1_wksp(), and HUF_readDTableX2_wksp().
Definition at line 187 of file huf_decompress.c.
size_t HUF_readDTableX1_wksp | ( | HUF_DTable * | DTable, |
const void * | src, | ||
size_t | srcSize, | ||
void * | workSpace, | ||
size_t | wkspSize | ||
) |
Definition at line 118 of file huf_decompress.c.
Referenced by HUF_decompress1X1_DCtx_wksp(), HUF_decompress1X1_DCtx_wksp_bmi2(), HUF_decompress4X1_DCtx_wksp_bmi2(), HUF_readDTableX1(), and ZSTD_loadDEntropy().
Definition at line 651 of file huf_decompress.c.
size_t HUF_readDTableX2_wksp | ( | HUF_DTable * | DTable, |
const void * | src, | ||
size_t | srcSize, | ||
void * | workSpace, | ||
size_t | wkspSize | ||
) |
Definition at line 551 of file huf_decompress.c.
Referenced by HUF_decompress1X2_DCtx_wksp(), HUF_decompress4X2_DCtx_wksp_bmi2(), HUF_readDTableX2(), and ZSTD_loadDEntropy().
HUF_selectDecoder() : Tells which decoder is likely to decode faster, based on a set of pre-computed metrics.
Definition at line 1029 of file huf_decompress.c.
Referenced by HUF_decompress(), HUF_decompress1X_DCtx_wksp(), HUF_decompress4X_DCtx(), HUF_decompress4X_hufOnly_wksp(), and HUF_decompress4X_hufOnly_wksp_bmi2().
|
static |
Definition at line 1002 of file huf_decompress.c.
Referenced by HUF_selectDecoder().