3 ms·
The table doesn't contain the location in the file, only a mapping of bit sequence to original sequence. LZW also doesn't contain information on where sequence
by jimktrains2 12y ago
The table doesn't contain the location in the file, only a mapping of bit sequence to original sequence. LZW also doesn't contain information on where sequences are.
However, you could construct the compressed version of your search string and search for it (or in the case of LZW, generate it as you continue to search and decompress only small portions as needed).
Either way, you still have to go through the file. at least once.
EDIT: Actually, if your search string falls inside a compression block, it may be more difficult without uncompressing (and then discarding).