code: public static boolean activate(ServletRequest req) throws IOException {
          CompressionServletResponse rsp = (CompressionServletResponse) req.getAttribute(CompressionServletResponse.class.getName());
          if (rsp!=null) {
              rsp.activate();
              return true;
          } else {
              return false;
          }
      }
docs: Is this request already wrapped into {@link CompressionFilter},
  activate that, so that {@link ServletResponse#getOutputStream()} will return
  a stream that automatically handles compression.