Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0
-
None
-
None
-
Linux
Description
Current version of GzipCompressorOutputStream decorates only write(int b) method for underlying java.zip.util.GZipOutputStream.
In common scenario of:
OutputStream os = ...;
GzipCompressorOutputStream gcos = new GzipCompressorOutputStream(os);
[do extensive write(byte[] buf]
this results in very slow unbuffered write. This is particularly evident if the code changes to:
OutputStream os = ...;
GZIPOutputStream gos = new GZIPOutputStream(os);
[do extensive write(byte[] buf]
...which is blazingly faster.
In my environment, packing 100 Mb stream with Commons wrapper takes about 120 seconds, while using java.util.zip directly takes less than 1 second.
This performance hit is way too bad for simple wrapper.