I would add that a good example of the holy grail here would be Zig's primitive types e.g. u1 , u2, u3, etc. all which can be efficiently packed if a struct is marked to do so.
In addition to the integer types above, arbitrary bit-width integers can be referenced by using an identifier of
iorufollowed by digits. For example, the identifieri7refers to a signed 7-bit integer. The maximum allowed bit-width of an integer type is65535.