MCPcopy Create free account
hub / github.com/blend2d/blend2d / build_tree

Function build_tree

blend2d/compression/deflateencoder.cpp:561–588  ·  view source on GitHub ↗

Build the Huffman tree. This is an optimized implementation that (a) takes advantage of the frequencies being already sorted; (b) only generates non-leaf nodes, since the non-leaf nodes of a Huffman tree are sufficient to generate a canonical code; (c) Only stores parent pointers, not child pointers; (d) Produces the nodes in the same memory used for input frequency information. Array 'A', which

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected