I would like to compress an input stream in java using Gzip compression.
Let\'s say we have an input stream (1GB of data..) not compressed. I want as a result a comp
A working example of a compressing input stream can be found in the popular open source ESB Mule: GZIPCompressorInputStream.
It uses the DeflaterInputStream provided by the JRE for compression, prepends the gzip header and appends the gzip trailer (aka footer).
Unfortunately, it is under CPA License, which does not seem to be very common. In addition, there seems to be no unit test.