From 4cac322ee8e64e65856ae298e79f81b741f06d66 Mon Sep 17 00:00:00 2001 From: markt Date: Tue, 5 Jul 2011 17:28:44 +0000 Subject: [PATCH] Review comments git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1143150 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/catalina/tribes/group/interceptors/GzipInterceptor.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); -- 2.11.0