I am confused about the bitfields order.

mixin(bitfields!(
        bool,   "fin",        1,
        bool,   "rsv1",       1,
        bool,   "rsv2",       1,
        bool,   "rsv3",       1,
        Opcode, "opcode",     4,
                
        bool,   "mask",       1,
        ubyte,  "_size",      7,
));


output for first byte is 10000001 ,  the 2st byte 10000011

my code output:  opcode=8 mask=true size=65

the real size is 3 byte, and opcode is 1;

how to fix this ?

Reply via email to