MCPcopy Create free account
hub / github.com/rsc/tmp / InverseMoveToFrontTransform

Function InverseMoveToFrontTransform

brotli/dec_decode.c:926–961  ·  view source on GitHub ↗

Transform: 1) initialize list L with values 0, 1,... 255 2) For each input element X: 2.1) let Y = L[X] 2.2) remove X-th element from L 2.3) prepend Y to L 2.4) append Y to output In most cases max(Y) <= 7, so most of L remains intact. To reduce the cost of initialization, we reuse L, remember the upper bound of Y values, and reinitialize only first elements in L.

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

DecodeContextMapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…