MCPcopy Create free account
hub / github.com/F-Stack/f-stack / FSE_initCState

Function FSE_initCState

freebsd/contrib/zstd/lib/common/fse.h:513–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

511} FSE_symbolCompressionTransform; /* total 8 bytes */
512
513MEM_STATIC void FSE_initCState(FSE_CState_t* statePtr, const FSE_CTable* ct)
514{
515 const void* ptr = ct;
516 const U16* u16ptr = (const U16*) ptr;
517 const U32 tableLog = MEM_read16(ptr);
518 statePtr->value = (ptrdiff_t)1<<tableLog;
519 statePtr->stateTable = u16ptr+2;
520 statePtr->symbolTT = ct + 1 + (tableLog ? (1<<(tableLog-1)) : 1);
521 statePtr->stateLog = tableLog;
522}
523
524
525/*! FSE_initCState2() :

Callers 3

FSE_initCState2Function · 0.70
ZSTD_fseBitCostFunction · 0.50
ZSTD_rescaleFreqsFunction · 0.50

Calls 1

MEM_read16Function · 0.70

Tested by

no test coverage detected