[Pdx-pm] Big tied arrays
marvin at rectangular.com
Mon Jun 13 15:51:03 PDT 2005
(whoops on that blank message...)
On Jun 13, 2005, at 12:47 PM, Michael G Schwern wrote:
>> The DB_RECNO option from DB_File uses a single-byte record separator,
>> so that's out. Anything else?
> Why do the details of the record separator, a purely internal detail,
I need to be able to delimit arbitrary data -- for instance, packed
ints which may contain bytes that look like nulls or newlines. The
documentation for DB_File seems to indicate that DB_RECNO is for text
"DB_RECNO provides an interface to flat text files. Both variable and
fixed length records are supported... "
It goes on to talk about the the delimiter as being a single byte
only... If you could use a 16 byte random string as a delimiter,
then you could probabilistically get away with delimiting arbitrary
data, though I wonder how long inititialization would take for a big
It would have been clearer if I'd elaborated on my assumption: Since
DB_File DB_RECNO uses a single byte record separator -- rather than
addressing information (!) -- it's appropriate only for text files.
I'm surprised that no one's suggested a module close to what I
described. I'll consider breaking this code out of Kinosearch.
More information about the Pdx-pm-list