Re: bar code bit encoding

From: Jan Karrman <jan_at_it_dot_uu_dot_se>
Date: Tue Sep 16 2003 - 01:40:45 CDT

On Sat, 13 Sep 2003, Chris Schaefer wrote:

> Now Jans encoding scheme is to move the 72 bits representation as a
> single _VERY_ large binary number to decimal, and then use the code
> 128 decimal scheme to represent that. Before I continue, let me
> just say as a programmer that dealing with weird bit-aligned fields
> in data is very difficult and error prone. In the interests of
> clarity my inclination would be to move to byte aligned data, or
> perhaps nibble (4 bit) aligned data.

I don't understand why we should store data in bytes or nibbles.
Why not store each individual bit as an element in a vector? The
only reason I can see is to save memory; but we are talking about
at most some 500 bits of data here. Even if we store each bit as
a 32-bit integer, we only get 2K - that's nothing. I bet MS Windows
allocates more memory just from someone *looking* at a Word icon
on the desktop...

One-bit fields are always aligned.

= The content of this message, with the exception of any external
= quotations under fair use, are released to the Public Domain
Received on Tue Sep 30 23:17:06 2003

This archive was generated by hypermail 2.1.8 : Tue Sep 30 2003 - 23:17:09 CDT