searching within a compressed sorted fixed width file

Posted by user275455 on Stack Overflow See other posts from Stack Overflow or by user275455
Published on 2010-04-23T23:42:08Z Indexed on 2010/04/23 23:43 UTC
Read the original article Hit count: 225

Filed under:
|
|
|
|

Assume I have a regular compressed fixed width file that is sorted on one of the fields. Given that I know the length of the records, I can use lseek to implement a binary search to records with fields that match a given value without having to read the entire file.

Now the difficulty is that the file is gzipped. Is it possible to do this without completely inflating the file? If not with gzip. is there any compression that supports this kind of behavior?

© Stack Overflow or respective owner

Related posts about gzip

Related posts about fixed-width