Re: [PATCH 03/10] AXFS: axfs.h

Jared Hulbert
2008-08-22T18:12:34Z

>> So do I understand right that 3 bytes is your minimum size, and going
>> smaller than that would not be helpful? Otherwise I would assume that
>> storing a '5' should only take one byte instead of three.

Right. But you need 3 bytes to store the maximum value 0x0a0000

If we had:
0x0000000000000003
0x00000000000000FF
0x000000000000000A

You would only need a 1 byte depth.

> From the paper, the minimum size (called `depth') is 1.

Correct the depth can be from 1 to 8 bytes. The depth is determined
by the maximum value in the array.

>> I don't unsterstand yet why you store the length of each word separate
>> from the word. Most variable-length codes store that implicitly in
>> the data itself, e.g. in the upper three bits, so that for storing
>> 0x5, 0x1001, 0xa0000, this could e.g. end up as 0x054010014a0000,
>> which is shorter than what you have, but not harder to decode.
>
> AFAIU, the length (`depth') of each word is not stored separate, as the
> depth is the same for all values in the same table.

That is correct. Each table has a single depth stored in the region descriptor.