(Un)packing code feels unsafe, as there are some assumptions of types that can change. We should at least have some const asserts here for size assumptions (by looking using https://doc.rust-lang.org/std/primitive.u32.html#method.leading_zeros on max of types).
Originally posted by @sagudev in #1173 (comment)