Forums » #166 - DFDLv.1 Experience-3 »
New DFDL bitOrder is needed for binary format whose field order is specified right to left.
Added by russ hawkins about 8 years ago
I am responsible for parsing and unparsing binary formats whose specification lists the fields from right to left, and whose fields are rarely on byte boundaries, often many fields being contained within a single byte. Although within a given field the MSBit is on the left, within a given byte and across byte boundaries the first field to be parsed is to the right (toward the LSBit side) of the second field to parse, and so forth from beginning to end.
In a data stream for this protocol (serial or socket) the content bytes are presented least-significant byte first, which approximates the first to last field order but the approximation is insufficient. The inverted intra-byte and cross-byte field order presents a problem - it is not parsable with normal MSB first interpretation.
This problem is much different from and not solvable by a simple endian byte order specification.
The new 'bitOrder=leastSignificantBitFirst' enhancement addresses this need. Without the 'LSB first' feature we cannot parse this type of content with DFDL processors and must resort to custom solutions. There are several legacy formats whose specifications follow this reverse-field-order presentation whose parse and unparse will be facilitated by the new feature.
Replies (1)
CLOSED - was RE: New DFDL bitOrder is needed for binary format whose field order is specified right to left. - Added by Michael Beckerle almost 8 years ago
Thanks for your supporting comments. No followup required.
(1-1/1)