Dear Wiki user, You have subscribed to a wiki page or wiki category on "Commons Wiki" for change notification.
The "Compress" page has been changed by StefanBodewig: https://wiki.apache.org/commons/Compress?action=diff&rev1=8&rev2=9 Comment: COMPRESS-381 - improve performance by buffering Same goes for Compressor. Compressor streams are: bz2, gz, lzma, xz, pack200, Z. === Compressing a file === - {{{final OutputStream out = new FileOutputStream(output); + {{{final OutputStream out = new BufferedOutputStream(new FileOutputStream(output)); CompressorOutputStream cos = new CompressorStreamFactory().createCompressorOutputStream("bzip2", out); IOUtils.copy(new FileInputStream(input), cos); cos.close();}}} === Decompressing a file === - {{{final InputStream is = new FileInputStream(input); + {{{final InputStream is = new BufferedInputStream(new FileInputStream(input)); CompressorInputStream in = new CompressorStreamFactory().createCompressorInputStream("bzip2", is); IOUtils.copy(in, new FileOutputStream(output)); in.close();}}} --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org