Thanks @HippoBaro, this looks even better now. I'm fine with simply removing the dead code in this PR.
This does have me wondering if we should remove the BIT_PACKED encoder. We need a decoder for backwards compatibility, but we shouldn't ever be using it for level encoding.
Originally posted by @etseidl in #9447 (comment)