* Brotli
* etc.
+Links:
+
+* <https://gist.github.com/kirlf/2eb242f225f9bfed4ecbfc8e1e2f5f71>
+* <https://en.m.wikipedia.org/wiki/Huffman_coding>
+
# Prefix-code decode description
`pcdec RT,RA,RB,RC,imm`
overflow <- 0
do while in_pos <u 64
# walk the binary tree in `tree` from parent to the selected child
+ # XXX should this be "in-_bits" not "bitstream"?
decoded <- decoded * 2 + bitstream[63 - in_pos]
in_pos <- in_pos + 1
if decoded >=u 64 then
output[56 - 8 * out_byte:63 - 8 * out_byte] <- decoded
decoded <- 1
out_byte <- out_byte + 1
+ # XXX if one? if "imm"?
if one | (out_byte >=u 8) then
break
RT <- output
# [DRAFT] Prefix-code encode
-TODO
\ No newline at end of file
+TODO