> We could do something similar by placing the LZMA check at the end in > the CompressorStreamFactory's autodetect method and perform the same > plausibility checks on the input. This would still run the risk of > false positives and - maybe less likely - false negatives. Do we want > to do something like this?
And then comes along yet another compression format that has no intention of providing a header. Which one would go first then? I think the contract of the factory is to "detect the stream if possible". If there is no definite way of detecting a stream then let's document and don't bother. Of course we could be user friendly and add the heuristic but that's like opening a can of worms. My 2 cents cheers, Torsten --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org