logo       

[jira] Created: (COMPRESS-83) GzipCompressorOutputStream should forward wri: msg#00440

issues-commons-apache

Subject: [jira] Created: (COMPRESS-83) GzipCompressorOutputStream should forward write(byte[] buf) and write(byte[] buf, int off, int len) to underlying stream

GzipCompressorOutputStream should forward write(byte[] buf) and write(byte[]
buf, int off, int len) to underlying stream
------------------------------------------------------------------------------------------------------------------------

Key: COMPRESS-83
URL: https://issues.apache.org/jira/browse/COMPRESS-83
Project: Commons Compress
Issue Type: Improvement
Affects Versions: 1.0
Environment: Linux
Reporter: Aleksey Shipilev


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.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise