Say I have a bzip2 file (over 5GB), and I want to decompress only block #x, because there is where my data is (block is different every time). How would I do this?
I thought about making an index of where all the blocks are, then cut the block I need from the file and apply bzip2recover to it.
I also thought about compressing say 1MB at a time, then appending this to a file (and recording the location), and simply grabbing the file when I need it, but I'd rather keep the original bzip2 file intact.
My preferred language is Ruby, but any language's solution is fine by me (as long as I understand the principle).