@@ -0,0 +1,1033 @@
+package com.wizzardo.http.filter;%0A%0Aimport com.wizzardo.http.Filter;%0Aimport com.wizzardo.http.request.Header;%0Aimport com.wizzardo.http.request.Request;%0Aimport com.wizzardo.http.response.Response;%0Aimport com.wizzardo.tools.misc.pool.*;%0A%0Aimport java.io.ByteArrayOutputStream;%0Aimport java.util.zip.GZIPOutputStream;%0A%0A/**%0A * Created by wizzardo on 30.06.15.%0A */%0Apublic class GzipFilter implements Filter %7B%0A%0A    protected Pool%3CByteArrayOutputStream%3E buffers = new PoolBuilder%3CByteArrayOutputStream%3E()%0A            .supplier(ByteArrayOutputStream::new)%0A            .resetter(ByteArrayOutputStream::reset)%0A            .build();%0A%0A    @Override%0A    public boolean filter(Request request, Response response) %7B%0A        return buffers.provide(out -%3E %7B%0A            GZIPOutputStream gout = new GZIPOutputStream(out);%0A            gout.write(response.getBody());%0A            gout.close();%0A            response.setBody(out.toByteArray());%0A            response.appendHeader(Header.KV_CONTENT_ENCODING_GZIP);%0A            return true;%0A        %7D);%0A    %7D%0A%7D%0A

add GzipFilter