I have problem, rather close to Binary search in a sorted (memory-mapped ?) file in Java
I want to implement binary search for string in a large file with java MappedByteBuffers but in my case, large file is compressed with bzip2. Let's say that file was compressed with -1 option 100k block. (Actually I don't know exact options but I can repak file).
How should I search strings in such MappedByteBuffer? How to decompress 1 block? Is there some standart lib or I should read header, deflate section and crc? And will those block be 100k in compressed state, or 100k it's uncompressed data length? And how last block looks like?
Have somebody done BinarySearch over compressed file, maybe not with Java?