I wanted to share this bits dump so that people working on VSCode and the
data display aspects can see what kind of data display some users
are needing in order to debug data of late.

We've written little tools to create this for us in order to debug DFDL
schemas for mil-std-2045 and other mil-std data formats that use bitOrder
'leastSignificantBitFirst' and are not byte oriented.

These formats never waste a bit. Absolutely nothing is byte aligned ever.
Text strings are infrequent, but when they do occur 7-bits per character,
packed together with no wasted bits, is typical.

******* Data Dump *********

3322 2222  2222 1111  1111 1100  0000 0000      addr bitPos

1098 7654  3210 9876  5432 1098  7654 3210      hex  dec(0b)

------------------------------------------------------------

0000 0000  0000 0000  0000 0001  0110 0010 :00000010    128

0101 0010  1110 0110  1100 1101  0100 1101 :00000014    160

0101 0011  0011 0001  1001 0000  0001 0001 :00000018    192

1000 0001  0001 1011  1100 1000  0000 0000 :0000001c    224

0000 0000  0000 0000  0010 1011  0000 0000 :00000020    256

0010 0001  0000 0100  1000 0110  1100 0100 :00000024    288

0100 0011  0111 1011  1100 0111  0010 0100 :00000028    320

0101 0111  1101 1100  0001 1101  0010 0101 :0000002c    352

0000 1101  0010 0100  1000 1111  1110 1100 :00000030    384

0111 0010  1100 1001  1100 0101  0001 0101 :00000034    416

0101 1000  1011 1010  1111 0011  0010 0010 :00000038    448

1111 1111  1101 0011  0001 1110  0101 1101 :0000003c    480

0001 1100  1111 0100  1110 1000  1010 1000 :00000040    512

1100 0010  1000 0011  1001 1110  1001 0100 :00000044    544

0100 1110  0111 1001  0110 1010  0010 0000 :00000048    576

                      0000 0011  1111 1111 :0000004c    608

------------------------------------------------------------



This is a right-to-left display of data where bytes are numbered right to
left, and bits are numbered right to left.

Text is most often 7-bit ascii, but it is bit packed, and a character
begins at any bit position. However, there are also 6 and 5 bit character
encodings.


The addresses are byte positions, 0-based. The bit positions are decimal,
also 0-based.


I added the color alternating highlighting of the last characters of this
example data which are "This is a Test␔" (which ends with a DEL). This is
just by way of showing that it is possible to pick out the 7-bit-wide
characters. It also illustrates why there is no text dump along side this
bits dump. Because given that a character can start on any bit boundary
there's no sensible interpretation of this data as text until you identify
the start bit of the first character.


Mike Beckerle
Apache Daffodil PMC | daffodil.apache.org
OGF DFDL Workgroup Co-Chair | www.ogf.org/ogf/doku.php/standards/dfdl/dfdl
Owl Cyber Defense | www.owlcyberdefense.com

Reply via email to