MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / rans_decode_renorm

Function rans_decode_renorm

nodedb-codec/src/rans.rs:252–258  ·  view source on GitHub ↗
(mut state: u32, stream: &[u8], pos: &mut usize)

Source from the content-addressed store, hash-verified

250}
251
252fn rans_decode_renorm(mut state: u32, stream: &[u8], pos: &mut usize) -> u32 {
253 while state < RANS_L && *pos > 0 {
254 *pos -= 1;
255 state = (state << 8) | stream[*pos] as u32;
256 }
257 state
258}
259
260// ---------------------------------------------------------------------------
261// Frequency table operations

Callers 1

decodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected