On Fri, 16 Jun 2006, [EMAIL PROTECTED] wrote: > So basically, why not mmap() the file, go through the map counting \n > while replacing them by \0 until you reach end of map. allocate an > array the size of the counter and have each array entry point to where > it should in the memory map ?
I implemented a similar technique in patch(1), minus the '\n' -> '\0' replacing; patch does not use NUL terminated strings internally. But it all depends on which data is being stored: just the lines from the file, or data based on the chars found in the file. -Otto