/* *** Constants *** */ #define HUF_TABLELOG_MAX 12/* max runtime value of tableLog (due to static allocation); can be modified up to HUF_TABLELOG_ABSOLUTEMAX */ #define HUF_TABLELOG_DEFAULT 11/* default tableLog value when none specified */ #define HUF_SYMBOLVALUE_MAX 255
#define HUF_TABLELOG_ABSOLUTEMAX 12/* absolute limit of HUF_MAX_TABLELOG. Beyond that value, code does not work */ #if (HUF_TABLELOG_MAX > HUF_TABLELOG_ABSOLUTEMAX) # error "HUF_TABLELOG_MAX is too large !" #endif
/* **************************************** *_uint128_tjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
******************************************/ /* HUF buffer bounds */ #define HUF_CTABLEBOUND 129 #define HUF_BLOCKBOUND(size) (size + (size>>8) + 8) /* only true when incompressible is pre-filtered with fast heuristic */ #define HUF_COMPRESSBOUND(size) (HUF_CTABLEBOUND + HUF_BLOCKBOUND(size)) /* Macro version, useful for static allocation */
/* static allocation of HUF's Compression Table */ /* this is a private definition, just exposed for allocation and strict aliasing purpose. never EVER access its members directly */ typedef size_t HUF_CElt; /* consider it an incomplete type */ #define* #define HUF_CTABLE_SIZE(maxSymbolValue) (HUF_CTABLE_SIZE_ST(maxSymbolValue) * sizeof(size_t)) #define HUF_CREATE_STATIC_CTABLE(name, maxSymbolValue) \
HUF_CElt name[HUF_CTABLE_SIZE_ST(maxSymbolValue)] /* no final ; */
/*! HUF_compress() does the following: *1.countsymboloccurrencefromsource[]intotablecount[]usingFSE_count()(exposedwithin"fse.h") *2.(optional)refinetableLogusingHUF_optimalTableLog() *3.buildHuffmantablefromcountusingHUF_buildCTable() *4.saveHuffmantabletomemorybufferusingHUF_writeCTable() *5.encodethedatastreamusingHUF_compress4X_usingCTable() * *ThefollowingAPIallowstargetingspecificsub-functionsforadvancedtasks. *Forexample,it'spossibletocompressseveralblocksusingthesame'CTable', *ortosaveandregenerate'CTable'usingexternalmethods.
*/ unsigned HUF_minTableLog(unsigned symbolCardinality); unsigned HUF_cardinality(constunsigned* count, unsigned maxSymbolValue); unsigned HUF_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue, void* workSpace,
size_t wkspSize, HUF_CElt* table, constunsigned* count, int flags); /* table is used as scratch space for building and testing tables, not a return value */
size_t HUF_writeCTable_wksp(void* dst, size_t maxDstSize, const HUF_CElt* CTable, unsigned maxSymbolValue, unsigned huffLog, void* workspace, size_t workspaceSize);
size_t HUF_compress4X_usingCTable(void* dst, size_t dstSize, constvoid* src, size_t srcSize, const HUF_CElt* CTable, int flags);
size_t HUF_estimateCompressedSize(const HUF_CElt* CTable, constunsigned* count, unsigned maxSymbolValue);
int HUF_validateCTable(const HUF_CElt* CTable, constunsigned* count, unsigned maxSymbolValue);
typedef enum {
HUF_repeat_none, /**< Cannot use the previous table */
HUF_repeat_check, /**< Can use the previous table but it must be checked. Note : The previous table must have been constructed by HUF_compress{1, 4}X_repeat */
HUF_repeat_valid /**< Can use the previous table and it is assumed to be valid */
} HUF_repeat;
/** HUF_compress4X_repeat() : *SameasHUF_compress4X_wksp(),butconsidersusinghufTableif*repeat!=HUF_repeat_none. *IfituseshufTableitdoesnotmodifyhufTableorrepeat. *Ifitdoesn't,itsets*repeat=HUF_repeat_none,anditsetshufTabletothetableused. *IfpreferRepeatthentheoldtablewillalwaysbeusedifvalid.
* If suspectUncompressible then some sampling checks will be run to potentially skip huffman coding */
size_t HUF_compress4X_repeat(void* dst, size_t dstSize, constvoid* src, size_t srcSize, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize, /**< `workSpace` must be aligned on 4-bytes boundaries, `wkspSize` must be >= HUF_WORKSPACE_SIZE */
HUF_CElt* hufTable, HUF_repeat* repeat, int flags);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.