You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LSB0 - the least significant bit is the bit 0, it is the default Java mode and JBBP uses the mode by default
MSB0 - the most significant bit is the bit 0
JBBP allows both the mode but it should be defined once before operations over parsing or packing operations, the mode is provided by com.igormaznitsa.jbbp.io.JBBPBitOrder enum which contains predefined values. To define the bit order for parsing operations, you can just define the bit order during a parser preparation, like as in the example:
JBBPParser.prepare("byte;", JBBPBitOrder.MSB0);
Packing
For pack operations you can send the value through a BeginBin() command of the DSL:
Just remember that the bit ordering can be defined only once before operations and it is impossible to parse block field with different bit order for each field.