You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@daffodil.apache.org by "Costello, Roger L." <co...@mitre.org> on 2019/02/19 20:41:32 UTC

Are these statements about bitOrder and byteOrder correct and complete?

Hello DFDL community,
Are the following statements correct and complete?
When is an element not affected by dfdl:bitOrder?

  *   An element is not affected by bitOrder only if both of these conditions are satisfied:
     *   Parsing for the element begins at a byte boundary in the input file.
     *   The element declares that is wants to gobble up (consume) an integral number of bytes.
When is an element affected by dfdl:bitOrder?

  *   An element is affected by bitOrder if either of these conditions are satisfied:
     *   Parsing for the element begins at a non-byte boundary in the input file.
     *   Parsing for the element begins at a byte boundary in the input file and the element declares that it wants to gobble up (consume) a number of bits that is not an integral of 8.
When does dfdl:byteOrder affect dfdl:bitOrder?

  *   An element that is affected by bitOrder is also affected by byteOrder if either of these conditions are satisfied:
     *   The number of bits to be consumed is greater than or equal to 8.
     *   The element declaration requests a number of bits that cannot be satisfied by the current byte; bits from the next byte must also be consumed.
/Roger

Re: Are these statements about bitOrder and byteOrder correct and complete?

Posted by "Beckerle, Mike" <mb...@tresys.com>.
Your very last statement: "The element declaration requests a number of bits that cannot be satisfied by the current byte; bits from the next byte must also be consumed."


Doesn't seem right to me.


If a bit field begins in one byte, ends in the next, but is 8 or fewer bits long, then bitOrder matters, but byteOrder does not.





<https://w>

________________________________
From: Costello, Roger L. <co...@mitre.org>
Sent: Tuesday, February 19, 2019 3:41:32 PM
To: users@daffodil.apache.org
Subject: Are these statements about bitOrder and byteOrder correct and complete?


Hello DFDL community,

Are the following statements correct and complete?

When is an element not affected by dfdl:bitOrder?

  *   An element is not affected by bitOrder only if both of these conditions are satisfied:
     *   Parsing for the element begins at a byte boundary in the input file.
     *   The element declares that is wants to gobble up (consume) an integral number of bytes.

When is an element affected by dfdl:bitOrder?

  *   An element is affected by bitOrder if either of these conditions are satisfied:
     *   Parsing for the element begins at a non-byte boundary in the input file.
     *   Parsing for the element begins at a byte boundary in the input file and the element declares that it wants to gobble up (consume) a number of bits that is not an integral of 8.

When does dfdl:byteOrder affect dfdl:bitOrder?

  *   An element that is affected by bitOrder is also affected by byteOrder if either of these conditions are satisfied:
     *   The number of bits to be consumed is greater than or equal to 8.
     *   The element declaration requests a number of bits that cannot be satisfied by the current byte; bits from the next byte must also be consumed.

/Roger