[DFDL-WG] fix to alignment language for draft 038

Mike Beckerle mbeckerle.dfdl at gmail.com
Wed Feb 10 08:46:03 CST 2010


Fixing alignment for base 1 positions. This replaces the corresponding
paragraphs in Section 14.1 of draft 038.

...

An element's representation is aligned to N units if P is the first position
in the representation and P mod N = 1.  When parsing, the position of the
first unit of the data stream is 1.

For example, if alignment=4, and alignmentUnits='bytes', then the element's
representation must begin at 1 or 1 plus a multiple of a 4 bytes.  I.e., 1,
5, 9, 13, 17 and so on.

The length of the alignment fill region is measured in bits. If
alignmentUnits is ‘bytes’ then we multiply the alignment value by 8 to get
the *bit alignment*, B. If the current position (first position after the
end of the previous element) value is bit position N, then the length of the
alignment fill region is the smallest non-negative integer L such that (L +
N) mod B = 1.  The position of the first bit of the aligned element is P = L
+ N.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ogf.org/pipermail/dfdl-wg/attachments/20100210/64654e3d/attachment.html 


More information about the dfdl-wg mailing list