public static GzipHandler buildGzipHandler(final Handler wrapped) {
    final GzipHandler gzipHandler = new GzipHandler();
    gzipHandler.setHandler(wrapped);
    return gzipHandler;
  }
Construct and configure an instance of {@link GzipHandler}. With complex
multi-{@link WebAppContext} configurations, it's easiest to apply this handler directly to the
instance of {@link Server} near the end of its configuration, something like

<pre>
Server server = new Server();
// ...
server.setHandler(buildGzipHandler(server.getHandler()));
server.start();
</pre>
hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java