[ZODB-Dev] crypto hash as key for BTrees
Tim Peters
tim at zope.com
Fri Feb 20 17:41:31 EST 2004
[John Belmonte]
> While I'm in ZODB question mode-- I vaguely remember some mention on
> the list about this before, but what is the best way
"Best" depends on your goals -- I really can't guess.
> to use a crypto hash (for example, 160-bits of data) as a key for
> a BTree container? The options seem to be:
>
> * OOTree with key as binary string
Most compact, hard for humans to read.
> * OOTree with key as encoded string (hex, base64, etc.)
Bigger than necessary, easy for humans to read.
> * IOBTree with key as number (does IOBTree support large
> integers?)
Not an option: "I" means a Python short int, which is the same as the
platform C long int type. OOBTree with key as number (where the key is a
Python (unbounded) long int) is a possiblity, though.
More information about the ZODB-Dev
mailing list