if (FramedSnappyCompressorInputStream.matches(signature, signatureLength)) {
return new FramedSnappyCompressorInputStream(in);
}
if (ZCompressorInputStream.matches(signature, signatureLength)) {
return new ZCompressorInputStream(in);
}
} catch (IOException e) {
throw new CompressorException("Failed to detect Compressor from InputStream.", e);
}