Reputation: 3607
I see that the issue of randomly-reading compressed data is typically resolved by block compression, allowing decompression to start at the nearest compressed block start position which, depending on the block size, should be close to where the user actually wanted to start decompression from. However, I am curious if there exists any compression algorithm that allows for decompression to truly start from any position in the compressed stream.
Upvotes: 0
Views: 212
Reputation: 112374
Certainly no standard compression format. I could imagine a simple, fixed Huffman coding of symbols for which you could enter the stream not anywhere, but at the start of any Huffman code. However without an index as big as the file itself, there would be no way to know which bit locations are the starts of codes. In any case, the compression would be unimpressive using Huffman only.
Upvotes: 1