-Re: lookup table
Stack 2012-09-16, 22:16
On Sat, Sep 15, 2012 at 8:09 AM, Rita <[EMAIL PROTECTED]> wrote:
> I am debating if a lookup table would help my situation.
> I have a bunch of codes which map with timestamp (unsigned int). The codes
> look like this
> The size range from 1 character to 4 characters (1 to 4 bytes,
> Would adding a lookup table for all my codes help in reducing space? If so,
> what would be the best way to hash something like this?
You are trying to save on disk space? You could make your keys binary
four bytes max null prefixed if < 4 characters? Why are you trying to
save disk space? You want a lookup table so you can have a code that
is smaller than that of the 1-4 character codes?