org.tukaani.xz.LZMAOutputStream Java Examples
The following examples show how to use
org.tukaani.xz.LZMAOutputStream.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HeapAnalysisModule.java From spark with GNU General Public License v3.0 | 5 votes |
@Override public Path compress(Path file, LongConsumer progressHandler) throws IOException { Path compressedFile = file.getParent().resolve(file.getFileName().toString() + ".lzma"); try (InputStream in = Files.newInputStream(file)) { try (OutputStream out = Files.newOutputStream(compressedFile)) { try (LZMAOutputStream compressionOut = new LZMAOutputStream(out, new LZMA2Options(), true)) { copy(in, compressionOut, progressHandler); } } } return compressedFile; }