return new XZCompressorInputStream(in, true); } else if (fileName.endsWith(SNAPPY_SUFFIX)) { return new FramedSnappyCompressorInputStream(in); } else if (fileName.endsWith(ZSTD_SUFFIX)) { return new ZstdCompressorInputStream(in);
@Override public CompressorInputStream compressorInputStream(InputStream is) throws IOException { return new FramedSnappyCompressorInputStream(is); }
@Override public CompressorInputStream compressorInputStream(InputStream is) throws IOException { return new FramedSnappyCompressorInputStream(is); }
@Override public CompressorInputStream open(File compressedFile) throws IOException { InputStream is = new FileInputStream(compressedFile); try { return new FramedSnappyCompressorInputStream(is); } catch (IOException ioe) { try { is.close(); } catch (Exception e) {} throw ioe; } }
@Override public CompressorInputStream open(File compressedFile) throws IOException { InputStream is = new FileInputStream(compressedFile); try { return new FramedSnappyCompressorInputStream(is); } catch (IOException ioe) { try { is.close(); } catch (Exception e) {} throw ioe; } }
/** * @param stream the stream to read from, should be buffered */ @Override public CompressorInputStream getCompressorStream(InputStream stream) throws IOException { return framed ? new FramedSnappyCompressorInputStream(stream) : (CompressorInputStream) new SnappyCompressorInputStream(stream); }
return new XZCompressorInputStream(in, true); } else if (fileName.endsWith(SNAPPY_SUFFIX)) { return new FramedSnappyCompressorInputStream(in); } else if (fileName.endsWith(ZSTD_SUFFIX)) { return new ZstdCompressorInputStream(in);