
My apologies for the useless message that just went to the list....
Before I answer the first question regarding 24-bit integers, etc., please allow me to kindly ask you:
Where are you going to store the 24-bit integer that you read from "raw memory" (= untyped memory = array of bytes) ? Or where is the 24-bit integer that you plan to write to "raw memory" stored ?
(In what type of variable ?)
It could be a vanilla int. Or a boost::integer::uint24_t. How about: struct foo { int rgb:24; int bar:3; int baz:4; int alpha:1; }; The point of your library is to interface with low-level file formats. Anything goes down there.
My answer is probably obvious by now. I am thinking about letting the programmer use the ultimate weapon she has in her toolchest:
The mighty "if" instruction.
I didn't need the long winded fluff.