我想在Java中使用Gzip压缩来压缩输入流。
假设我们有一个未经压缩的输入流(1GB的数据...)。 我想从源获取一个压缩的输入流作为结果:
public InputStream getCompressedStream(InputStream unCompressedStream) {
// Not working because it's uncompressing the stream, I want the opposite.
return new GZIPInputStream(unCompressedStream);
}