in reply to index first 24 bits of every line in file

If your files are really large and you need to have fast direct access to each of the lines, why not putting them into a database? It looks as if you are trying to re-invent databases! SQLite seems a good candidate for such a problem. Once installed you can then load and access the lines through the usual DBI interface.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

  • Comment on Re: index first 24 bits of every line in file