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

Function ChooseContextMap

brotli/enc_encode.c:251–309  ·  view source on GitHub ↗

Decide about the context map based on the ability of the prediction ability of the previous byte UTF8-prefix on the next byte. The prediction ability is calculated as Shannon entropy. Here we need Shannon entropy instead of 'BitsEntropy' since the prefix will be encoded with the remaining 6 bits of the following byte, and BitsEntropy will assume that symbol to be stored alone using

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

Calls 1

ShannonEntropyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…