File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -348,6 +348,14 @@ const parser = new Parser()
348348 .int32 (" c" );
349349```
350350
351+ This setting also affects the bit extraction order of
352+ [ bit field] ( #bit1-32name-options ) methods (` bit1 ` to ` bit32 ` ). In big-endian
353+ mode, bit fields are extracted from MSB to LSB.
354+ In little-endian mode, bit fields are extracted from LSB to MSB.
355+ If you need big-endian bit ordering while using little-endian
356+ byte ordering, you can parse bit fields in a separate ` Parser ` with
357+ ` .endianness("big") ` and embed it using ` .nest() ` .
358+
351359### namely(alias)
352360Set an alias to this parser, so that it can be referred to by name in methods
353361like ` .array ` , ` .nest ` and ` .choice ` , without the requirement to have an
You can’t perform that action at this time.
0 commit comments