Bit-packed structure (record) in Free Pascal and Delphi
Here is the code explaining some methods to pack bit accessing logic in your program.
program project1;
type
TRec1 = packed record // Doesn't pack at all
b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16: boolean;
end;
TRec2 = bitpacked record // Free Pascal specific …