MCPcopy Create free account
hub / github.com/BaseXdb/basex / gzip

Method gzip

basex-api/src/main/java/org/basex/BaseXHTTP.java:244–255  ·  view source on GitHub ↗

Returns a GZIP handler. @param wac web application context @return handler

(final WebAppContext wac)

Source from the content-addressed store, hash-verified

242 * @return handler
243 */
244 private static Supplier<Handler> gzip(final WebAppContext wac) {
245 return () -> {
246 final CompressionHandler ch = new CompressionHandler();
247 final GzipCompression gc = new GzipCompression();
248 ch.putCompression(gc);
249 final CompressionConfig cc = CompressionConfig.builder().defaults().
250 compressIncludeMethod("PUT").decompressIncludeMethod("PUT").build();
251 ch.putConfiguration("/", cc);
252 ch.setHandler(wac);
253 return ch;
254 };
255 }
256
257 @Override
258 protected void parseArgs() throws IOException {

Callers 1

BaseXHTTPMethod · 0.95

Calls 3

defaultsMethod · 0.80
builderMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected