Re:QOI – The “Quite OK Image Format” for fast, lossless imag...
by edflsafoiewq on Thursday December 23, 2021 @10:25PM
(#29669773)
Exactly. Normally you use second-level tables for the long codes. In the first table, if code doesn't reach a leaf, tbl[code] holds a pointer to the next table to use.
For example, here's JPEG XL's Huffman decoder: https://github.com/libjxl/libjxl/blob/1c67f4eff0464e6241f365.... The branch uses a second table if the code was too long.