ReactOS  0.4.15-dev-2700-g4b4ffa9
huf.h
Go to the documentation of this file.
1 /* ******************************************************************
2  huff0 huffman codec,
3  part of Finite State Entropy library
4  Copyright (C) 2013-present, Yann Collet.
5 
6  BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
7 
8  Redistribution and use in source and binary forms, with or without
9  modification, are permitted provided that the following conditions are
10  met:
11 
12  * Redistributions of source code must retain the above copyright
13  notice, this list of conditions and the following disclaimer.
14  * Redistributions in binary form must reproduce the above
15  copyright notice, this list of conditions and the following disclaimer
16  in the documentation and/or other materials provided with the
17  distribution.
18 
19  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31  You can contact the author at :
32  - Source repository : https://github.com/Cyan4973/FiniteStateEntropy
33 ****************************************************************** */
34 
35 #if defined (__cplusplus)
36 extern "C" {
37 #endif
38 
39 #ifndef HUF_H_298734234
40 #define HUF_H_298734234
41 
42 /* *** Dependencies *** */
43 #include <stddef.h> /* size_t */
44 
45 
46 /* *** library symbols visibility *** */
47 /* Note : when linking with -fvisibility=hidden on gcc, or by default on Visual,
48  * HUF symbols remain "private" (internal symbols for library only).
49  * Set macro FSE_DLL_EXPORT to 1 if you want HUF symbols visible on DLL interface */
50 #if defined(FSE_DLL_EXPORT) && (FSE_DLL_EXPORT==1) && defined(__GNUC__) && (__GNUC__ >= 4)
51 # define HUF_PUBLIC_API __attribute__ ((visibility ("default")))
52 #elif defined(FSE_DLL_EXPORT) && (FSE_DLL_EXPORT==1) /* Visual expected */
53 # define HUF_PUBLIC_API __declspec(dllexport)
54 #elif defined(FSE_DLL_IMPORT) && (FSE_DLL_IMPORT==1)
55 # define HUF_PUBLIC_API __declspec(dllimport) /* not required, just to generate faster code (saves a function pointer load from IAT and an indirect jump) */
56 #else
57 # define HUF_PUBLIC_API
58 #endif
59 
60 
61 /* ========================== */
62 /* *** simple functions *** */
63 /* ========================== */
64 
74 HUF_PUBLIC_API size_t HUF_compress(void* dst, size_t dstCapacity,
75  const void* src, size_t srcSize);
76 
87 HUF_PUBLIC_API size_t HUF_decompress(void* dst, size_t originalSize,
88  const void* cSrc, size_t cSrcSize);
89 
90 
91 /* *** Tool functions *** */
92 #define HUF_BLOCKSIZE_MAX (128 * 1024)
93 HUF_PUBLIC_API size_t HUF_compressBound(size_t size);
95 /* Error Management */
96 HUF_PUBLIC_API unsigned HUF_isError(size_t code);
97 HUF_PUBLIC_API const char* HUF_getErrorName(size_t code);
100 /* *** Advanced function *** */
101 
106 HUF_PUBLIC_API size_t HUF_compress2 (void* dst, size_t dstCapacity,
107  const void* src, size_t srcSize,
108  unsigned maxSymbolValue, unsigned tableLog);
109 
113 #define HUF_WORKSPACE_SIZE (6 << 10)
114 #define HUF_WORKSPACE_SIZE_U32 (HUF_WORKSPACE_SIZE / sizeof(U32))
115 HUF_PUBLIC_API size_t HUF_compress4X_wksp (void* dst, size_t dstCapacity,
116  const void* src, size_t srcSize,
117  unsigned maxSymbolValue, unsigned tableLog,
118  void* workSpace, size_t wkspSize);
119 
120 #endif /* HUF_H_298734234 */
121 
122 /* ******************************************************************
123  * WARNING !!
124  * The following section contains advanced and experimental definitions
125  * which shall never be used in the context of a dynamic library,
126  * because they are not guaranteed to remain stable in the future.
127  * Only consider them in association with static linking.
128  * *****************************************************************/
129 #if defined(HUF_STATIC_LINKING_ONLY) && !defined(HUF_H_HUF_STATIC_LINKING_ONLY)
130 #define HUF_H_HUF_STATIC_LINKING_ONLY
131 
132 /* *** Dependencies *** */
133 #include "mem.h" /* U32 */
134 
135 
136 /* *** Constants *** */
137 #define HUF_TABLELOG_MAX 12 /* max runtime value of tableLog (due to static allocation); can be modified up to HUF_ABSOLUTEMAX_TABLELOG */
138 #define HUF_TABLELOG_DEFAULT 11 /* default tableLog value when none specified */
139 #define HUF_SYMBOLVALUE_MAX 255
140 
141 #define HUF_TABLELOG_ABSOLUTEMAX 15 /* absolute limit of HUF_MAX_TABLELOG. Beyond that value, code does not work */
142 #if (HUF_TABLELOG_MAX > HUF_TABLELOG_ABSOLUTEMAX)
143 # error "HUF_TABLELOG_MAX is too large !"
144 #endif
145 
146 
147 /* ****************************************
148 * Static allocation
149 ******************************************/
150 /* HUF buffer bounds */
151 #define HUF_CTABLEBOUND 129
152 #define HUF_BLOCKBOUND(size) (size + (size>>8) + 8) /* only true when incompressible is pre-filtered with fast heuristic */
153 #define HUF_COMPRESSBOUND(size) (HUF_CTABLEBOUND + HUF_BLOCKBOUND(size)) /* Macro version, useful for static allocation */
154 
155 /* static allocation of HUF's Compression Table */
156 #define HUF_CTABLE_SIZE_U32(maxSymbolValue) ((maxSymbolValue)+1) /* Use tables of U32, for proper alignment */
157 #define HUF_CTABLE_SIZE(maxSymbolValue) (HUF_CTABLE_SIZE_U32(maxSymbolValue) * sizeof(U32))
158 #define HUF_CREATE_STATIC_CTABLE(name, maxSymbolValue) \
159  U32 name##hb[HUF_CTABLE_SIZE_U32(maxSymbolValue)]; \
160  void* name##hv = &(name##hb); \
161  HUF_CElt* name = (HUF_CElt*)(name##hv) /* no final ; */
162 
163 /* static allocation of HUF's DTable */
164 typedef U32 HUF_DTable;
165 #define HUF_DTABLE_SIZE(maxTableLog) (1 + (1<<(maxTableLog)))
166 
167 
168 /* ****************************************
169 * Advanced decompression functions
170 ******************************************/
171 size_t HUF_decompress4X1 (void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize);
172 size_t HUF_decompress4X2 (void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize);
174 size_t HUF_decompress4X_DCtx (HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize);
175 size_t HUF_decompress4X_hufOnly(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize);
176 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);
177 size_t HUF_decompress4X1_DCtx(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize);
178 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);
179 size_t HUF_decompress4X2_DCtx(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize);
180 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);
183 /* ****************************************
184  * HUF detailed API
185  * ****************************************/
186 
198 unsigned HUF_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue);
199 typedef struct HUF_CElt_s HUF_CElt; /* incomplete type */
200 size_t HUF_buildCTable (HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue, unsigned maxNbBits); /* @return : maxNbBits; CTable and count can overlap. In which case, CTable will overwrite count content */
201 size_t HUF_writeCTable (void* dst, size_t maxDstSize, const HUF_CElt* CTable, unsigned maxSymbolValue, unsigned huffLog);
202 size_t HUF_compress4X_usingCTable(void* dst, size_t dstSize, const void* src, size_t srcSize, const HUF_CElt* CTable);
203 
204 typedef enum {
205  HUF_repeat_none,
206  HUF_repeat_check,
207  HUF_repeat_valid
208  } HUF_repeat;
214 size_t HUF_compress4X_repeat(void* dst, size_t dstSize,
215  const void* src, size_t srcSize,
216  unsigned maxSymbolValue, unsigned tableLog,
217  void* workSpace, size_t wkspSize,
218  HUF_CElt* hufTable, HUF_repeat* repeat, int preferRepeat, int bmi2);
219 
224 #define HUF_CTABLE_WORKSPACE_SIZE_U32 (2*HUF_SYMBOLVALUE_MAX +1 +1)
225 #define HUF_CTABLE_WORKSPACE_SIZE (HUF_CTABLE_WORKSPACE_SIZE_U32 * sizeof(unsigned))
226 size_t HUF_buildCTable_wksp (HUF_CElt* tree,
227  const U32* count, U32 maxSymbolValue, U32 maxNbBits,
228  void* workSpace, size_t wkspSize);
229 
235 size_t HUF_readStats(BYTE* huffWeight, size_t hwSize,
236  U32* rankStats, U32* nbSymbolsPtr, U32* tableLogPtr,
237  const void* src, size_t srcSize);
238 
241 size_t HUF_readCTable (HUF_CElt* CTable, unsigned* maxSymbolValuePtr, const void* src, size_t srcSize);
242 
247 U32 HUF_getNbBits(const void* symbolTable, U32 symbolValue);
248 
249 /*
250  * HUF_decompress() does the following:
251  * 1. select the decompression algorithm (X1, X2) based on pre-computed heuristics
252  * 2. build Huffman table from save, using HUF_readDTableX?()
253  * 3. decode 1 or 4 segments in parallel using HUF_decompress?X?_usingDTable()
254  */
255 
261 U32 HUF_selectDecoder (size_t dstSize, size_t cSrcSize);
262 
273 #define HUF_DECOMPRESS_WORKSPACE_SIZE (2 << 10)
274 #define HUF_DECOMPRESS_WORKSPACE_SIZE_U32 (HUF_DECOMPRESS_WORKSPACE_SIZE / sizeof(U32))
275 
276 size_t HUF_readDTableX1 (HUF_DTable* DTable, const void* src, size_t srcSize);
277 size_t HUF_readDTableX1_wksp (HUF_DTable* DTable, const void* src, size_t srcSize, void* workSpace, size_t wkspSize);
278 size_t HUF_readDTableX2 (HUF_DTable* DTable, const void* src, size_t srcSize);
279 size_t HUF_readDTableX2_wksp (HUF_DTable* DTable, const void* src, size_t srcSize, void* workSpace, size_t wkspSize);
280 
281 size_t HUF_decompress4X_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const HUF_DTable* DTable);
282 size_t HUF_decompress4X1_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const HUF_DTable* DTable);
283 size_t HUF_decompress4X2_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const HUF_DTable* DTable);
284 
285 
286 /* ====================== */
287 /* single stream variants */
288 /* ====================== */
289 
290 size_t HUF_compress1X (void* dst, size_t dstSize, const void* src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog);
291 size_t HUF_compress1X_wksp (void* dst, size_t dstSize, const void* src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize);
292 size_t HUF_compress1X_usingCTable(void* dst, size_t dstSize, const void* src, size_t srcSize, const HUF_CElt* CTable);
298 size_t HUF_compress1X_repeat(void* dst, size_t dstSize,
299  const void* src, size_t srcSize,
300  unsigned maxSymbolValue, unsigned tableLog,
301  void* workSpace, size_t wkspSize,
302  HUF_CElt* hufTable, HUF_repeat* repeat, int preferRepeat, int bmi2);
303 
304 size_t HUF_decompress1X1 (void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize); /* single-symbol decoder */
305 size_t HUF_decompress1X2 (void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize); /* double-symbol decoder */
306 
307 size_t HUF_decompress1X_DCtx (HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize);
308 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);
309 size_t HUF_decompress1X1_DCtx(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize);
310 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);
311 size_t HUF_decompress1X2_DCtx(HUF_DTable* dctx, void* dst, size_t dstSize, const void* cSrc, size_t cSrcSize);
312 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);
314 size_t HUF_decompress1X_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const HUF_DTable* DTable);
315 size_t HUF_decompress1X1_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const HUF_DTable* DTable);
316 size_t HUF_decompress1X2_usingDTable(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const HUF_DTable* DTable);
317 
318 /* BMI2 variants.
319  * If the CPU has BMI2 support, pass bmi2=1, otherwise pass bmi2=0.
320  */
321 size_t HUF_decompress1X_usingDTable_bmi2(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const HUF_DTable* DTable, int bmi2);
322 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);
323 size_t HUF_decompress4X_usingDTable_bmi2(void* dst, size_t maxDstSize, const void* cSrc, size_t cSrcSize, const HUF_DTable* DTable, int bmi2);
324 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);
325 
326 #endif /* HUF_STATIC_LINKING_ONLY */
327 
328 #if defined (__cplusplus)
329 }
330 #endif
size_t HUF_decompress1X_DCtx(HUF_DTable *dctx, void *dst, size_t dstSize, const void *cSrc, size_t cSrcSize)
size_t HUF_decompress4X2(void *dst, size_t dstSize, const void *cSrc, size_t cSrcSize)
size_t HUF_compress1X_repeat(void *dst, size_t dstSize, const void *src, size_t srcSize, unsigned maxSymbolValue, unsigned huffLog, void *workSpace, size_t wkspSize, HUF_CElt *hufTable, HUF_repeat *repeat, int preferRepeat, int bmi2)
Definition: huf_compress.c:749
size_t HUF_decompress1X_usingDTable(void *dst, size_t maxDstSize, const void *cSrc, size_t cSrcSize, const HUF_DTable *DTable)
HUF_PUBLIC_API const char * HUF_getErrorName(size_t code)
size_t HUF_decompress4X_usingDTable(void *dst, size_t maxDstSize, const void *cSrc, size_t cSrcSize, const HUF_DTable *DTable)
size_t HUF_writeCTable(void *dst, size_t maxDstSize, const HUF_CElt *CTable, U32 maxSymbolValue, U32 huffLog)
Definition: huf_compress.c:140
size_t HUF_readDTableX2_wksp(HUF_DTable *DTable, const void *src, size_t srcSize, void *workSpace, size_t wkspSize)
GLuint GLuint GLsizei count
Definition: gl.h:1545
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)
size_t HUF_decompress1X1_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)
HUF_PUBLIC_API unsigned HUF_isError(size_t code)
size_t HUF_decompress1X1_usingDTable(void *dst, size_t dstSize, const void *cSrc, size_t cSrcSize, const HUF_DTable *DTable)
size_t HUF_buildCTable_wksp(HUF_CElt *tree, const U32 *count, U32 maxSymbolValue, U32 maxNbBits, void *workSpace, size_t wkspSize)
Definition: huf_compress.c:354
size_t HUF_buildCTable(HUF_CElt *tree, const U32 *count, U32 maxSymbolValue, U32 maxNbBits)
Definition: huf_compress.c:428
#define HUF_PUBLIC_API
Definition: huf.h:57
size_t HUF_decompress4X_usingDTable_bmi2(void *dst, size_t maxDstSize, const void *cSrc, size_t cSrcSize, const HUF_DTable *DTable, int bmi2)
size_t HUF_decompress1X2_usingDTable(void *dst, size_t dstSize, const void *cSrc, size_t cSrcSize, const HUF_DTable *DTable)
size_t HUF_decompress1X2_DCtx(HUF_DTable *DCtx, void *dst, size_t dstSize, const void *cSrc, size_t cSrcSize)
unsigned HUF_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue)
Definition: huf_compress.c:74
size_t HUF_readDTableX2(HUF_DTable *DTable, const void *src, size_t srcSize)
size_t HUF_compress4X_repeat(void *dst, size_t dstSize, const void *src, size_t srcSize, unsigned maxSymbolValue, unsigned huffLog, void *workSpace, size_t wkspSize, HUF_CElt *hufTable, HUF_repeat *repeat, int preferRepeat, int bmi2)
Definition: huf_compress.c:795
size_t HUF_decompress4X1_DCtx(HUF_DTable *dctx, void *dst, size_t dstSize, const void *cSrc, size_t cSrcSize)
size_t HUF_readDTableX1(HUF_DTable *DTable, const void *src, size_t srcSize)
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)
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)
size_t HUF_decompress4X2_usingDTable(void *dst, size_t dstSize, const void *cSrc, size_t cSrcSize, const HUF_DTable *DTable)
HUF_PUBLIC_API size_t HUF_compress2(void *dst, size_t dstCapacity, const void *src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog)
Definition: huf_compress.c:807
size_t HUF_compress1X(void *dst, size_t dstSize, const void *src, size_t srcSize, unsigned maxSymbolValue, unsigned huffLog)
Definition: huf_compress.c:761
size_t HUF_decompress1X2(void *dst, size_t dstSize, const void *cSrc, size_t cSrcSize)
size_t HUF_decompress4X2_DCtx(HUF_DTable *dctx, void *dst, size_t dstSize, const void *cSrc, size_t cSrcSize)
size_t HUF_readCTable(HUF_CElt *CTable, U32 *maxSymbolValuePtr, const void *src, size_t srcSize)
Definition: huf_compress.c:176
size_t HUF_compress1X_wksp(void *dst, size_t dstSize, const void *src, size_t srcSize, unsigned maxSymbolValue, unsigned huffLog, void *workSpace, size_t wkspSize)
Definition: huf_compress.c:738
GLenum src
Definition: glext.h:6340
size_t HUF_decompress4X_DCtx(HUF_DTable *dctx, void *dst, size_t dstSize, const void *cSrc, size_t cSrcSize)
Definition: inflate.c:139
HUF_PUBLIC_API size_t HUF_decompress(void *dst, size_t originalSize, const void *cSrc, size_t cSrcSize)
unsigned char BYTE
Definition: xxhash.c:193
static int repeat
Definition: xmllint.c:143
size_t HUF_compress1X_usingCTable(void *dst, size_t dstSize, const void *src, size_t srcSize, const HUF_CElt *CTable)
Definition: huf_compress.c:567
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)
U32 HUF_selectDecoder(size_t dstSize, size_t cSrcSize)
size_t HUF_readDTableX1_wksp(HUF_DTable *DTable, const void *src, size_t srcSize, void *workSpace, size_t wkspSize)
size_t HUF_decompress4X1(void *dst, size_t dstSize, const void *cSrc, size_t cSrcSize)
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)
size_t HUF_decompress1X1(void *dst, size_t dstSize, const void *cSrc, size_t cSrcSize)
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)
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)
GLenum GLenum dst
Definition: glext.h:6340
size_t HUF_compress4X_usingCTable(void *dst, size_t dstSize, const void *src, size_t srcSize, const HUF_CElt *CTable)
Definition: huf_compress.c:621
size_t HUF_decompress1X_usingDTable_bmi2(void *dst, size_t maxDstSize, const void *cSrc, size_t cSrcSize, const HUF_DTable *DTable, int bmi2)
U32 HUF_getNbBits(const void *symbolTable, U32 symbolValue)
Definition: huf_compress.c:224
size_t HUF_decompress4X1_usingDTable(void *dst, size_t dstSize, const void *cSrc, size_t cSrcSize, const HUF_DTable *DTable)
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)
unsigned int U32
Definition: xxhash.c:195
HUF_PUBLIC_API size_t HUF_compress(void *dst, size_t dstCapacity, const void *src, size_t srcSize)
Definition: huf_compress.c:824
HUF_PUBLIC_API size_t HUF_compress4X_wksp(void *dst, size_t dstCapacity, const void *src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog, void *workSpace, size_t wkspSize)
Definition: huf_compress.c:781
size_t HUF_readStats(BYTE *huffWeight, size_t hwSize, U32 *rankStats, U32 *nbSymbolsPtr, U32 *tableLogPtr, const void *src, size_t srcSize)