MCPcopy Create free account
hub / github.com/BinomialLLC/basis_universal / FSE_decodeSymbol

Function FSE_decodeSymbol

zstd/zstddeclib.c:2866–2875  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2864}
2865
2866MEM_STATIC BYTE FSE_decodeSymbol(FSE_DState_t* DStatePtr, BIT_DStream_t* bitD)
2867{
2868 FSE_decode_t const DInfo = ((const FSE_decode_t*)(DStatePtr->table))[DStatePtr->state];
2869 U32 const nbBits = DInfo.nbBits;
2870 BYTE const symbol = DInfo.symbol;
2871 size_t const lowBits = BIT_readBits(bitD, nbBits);
2872
2873 DStatePtr->state = DInfo.newState + lowBits;
2874 return symbol;
2875}
2876
2877/*! FSE_decodeSymbolFast() :
2878 unsafe, only works if no symbol has a probability > 50% */

Callers

nothing calls this directly

Calls 1

BIT_readBitsFunction · 0.85

Tested by

no test coverage detected