Thomas Dickey dixit: > not easily: we'd have to save the data that wasn't decoded somewhere (since > we're not even looking at the header) and try different decompression > algorithms on it.
For the first two or three bytes, would an ungetch-like approach work? The deflate vs gzip compression is really a special case. Guessing is indeed much more work and involves buffering, for lzma-alone even the *entire* file content (LZMAv5 is supposed to use a gzip-like header to fix this problem). > 1F-08 ? (I'm looking at a gzip'd file beginning 1F-8B). Er, right, 1F 8B 08 it was. bye, //mirabilos -- Sometimes they [people] care too much: pretty printers [and syntax highligh- ting, d.A.] mechanically produce pretty output that accentuates irrelevant detail in the program, which is as sensible as putting all the prepositions in English text in bold font. -- Rob Pike in "Notes on Programming in C" _______________________________________________ Lynx-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lynx-dev
