Re: 64-bit CDB
Chris Dean <[email protected]> Thu, 18 Mar 2010 17:37:31 -0700
| Newsgroups | gmane.comp.djb.cdb |
|---|---|
| Message-ID | <[email protected]> |
Matt Chaput <[email protected]> writes: > Hi, I've written a Python implementation of the CDB algorithm as part > of a project. I'd like to convert it to use 64-bit disk offsets to get > around the 4-GB limit, but I don't understand how the > hash-to-disk-offset lookup process works and what depends on > 32-bit-ness well enough to do it with confidence. > > Has anyone done this already or can anyone point out what I'd need to > change in the algorithm to get it to work? Have you seen the diagram at http://www.unixuser.org/~euske/doc/cdbinternals/index.html To use language on that page, you need to change the pointer part of the data structure to take 64bits instead of 32. This will also make your implementation incompatible with existing cdb file formats. Cheers, Chris Dean