3 ms·
In Common Lisp, you can directly specify the size of your bytes, using types such as (unsigned-byte 3). Packing may be performed automatically, unfortunately i
by informatimago 10y ago
In Common Lisp, you can directly specify the size of your bytes, using types such as (unsigned-byte 3).
Packing may be performed automatically, unfortunately in an implementation specific way.
In C, you can also specify the size of your fields within integer types:
struct{
unsigned char lowByte:3, midByte:3, highByteLowBits:2;
};
And unfortunately too, the actual layour depends on the implementation.
So in most cases, you still have to implement bit shuffling yourself to produce the exact layout that is needed for external files.