From sci.crypt - copied here for reference...
On Nov 29, 5:08 am, LCC <
claylon...@comcast.net> wrote:
> Index to coordinates transformation
> For a particular value between 0 and 2**27, slice it into 16 fields
> using the IDA table entry specification. For an IDA field 00, there is
> no dimension, so just concatenate 4 bits with value zero onto the
> result. For IDA field 01, the dimension is two - one bit, so slice one
> bit from the LSB end and form a 4 bit value from it to concatenate
> onto the result. For an IDA field 10, slice two bits. For an IDA field
> 11, slice three bits. How you form the result from the 16x4 bits is
> something which I would make a user option to either go big-endian or
> little endian. Alternatively you could use one of the 16 factorial
> possible shuffles provided by a lookup table, if you designed the
> translation to be THAT flexible…
I notice that the specification above assumed that you WOULD be using
the coordinate difference method rather than the packed 32 bit
values.
In case someone out there is a mental cripple, the 16x4 bits can be
translated into 16x2 bits by assigning weights as follows for the
matching fields -
IDA field 00 - 0000 - no bits
IDA field 01 - 000x - x - 1 bit
IDA field 10 - 00xx - xx - 2 bits
IDA field 11 - 0xxx - xxx - 3 bits
The decision of which form to use is up to you, but probably the
deciding factor will be whether the data is stored on hard copy, or
transmitted in some fashion. Unpacking 32 bits takes much longer, but
they transmit twice as fast. Also consider the transmission medium
error rate, with the possibility that a block may become
indecipherable if multiple errors occur beyond the ability of ECC to
correct.
The coordinate difference will use all four of the bits to form a
vector from the most recent IVGTA coordinates to the current one,
signed and of magnitude between -7 and +7 for each four bit field.
Another factor to consider is that if you do indeed want to perform a
shuffle within the 16 factorial possibilities for the packed
coordinates, then you just bought yourself a headache doing the task
of unpacking them for decoding...
In summary, only a miser would use the bloat factor of 4 versus 8
encoding scheme.
Lonnie Courtney Clay