From: markt Date: Tue, 5 Jul 2011 17:28:44 +0000 (+0000) Subject: Review comments X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=4cac322ee8e64e65856ae298e79f81b741f06d66;p=tomcat7.0 Review comments git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1143150 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java b/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java index dca44a1f5..25926c665 100644 --- a/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java +++ b/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java @@ -82,11 +82,12 @@ public class GzipInterceptor extends ChannelInterceptorBase { * @throws IOException */ public static byte[] decompress(byte[] data) throws IOException { - ByteArrayOutputStream bout = new ByteArrayOutputStream(); + ByteArrayOutputStream bout = + new ByteArrayOutputStream(DEFAULT_BUFFER_SIZE); ByteArrayInputStream bin = new ByteArrayInputStream(data); GZIPInputStream gin = new GZIPInputStream(bin); byte[] tmp = new byte[DEFAULT_BUFFER_SIZE]; - int length = 0; + int length = gin.read(tmp); while (length > -1) { bout.write(tmp, 0, length); length = gin.read(tmp);