title: Java deflate response
body: <p>Hello all
  I want to make a filter for tomcat to deflate all responces of certain MIME type.
  Any guidelines?</p>
  
  <pre><code>...
   String ae = request.getHeader("accept-encoding");
          if (ae != null &amp;&amp; ae.indexOf("deflate") != -1) {
              deflate response...?????
          }
  chain.doFilter(request, res);
  </code></pre>