Home / Function/ testGetSnappyTargetContentEncoding() — netty Function Reference

testGetSnappyTargetContentEncoding() — netty Function Reference

Architecture documentation for the testGetSnappyTargetContentEncoding() function in HttpContentCompressorOptionsTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  a4a9fb22_17bb_8e9a_71d9_600fb7dd5b02["testGetSnappyTargetContentEncoding()"]
  7ae1f39f_149e_c84a_ee2f_a6350639bfd3["HttpContentCompressorOptionsTest"]
  a4a9fb22_17bb_8e9a_71d9_600fb7dd5b02 -->|defined in| 7ae1f39f_149e_c84a_ee2f_a6350639bfd3
  style a4a9fb22_17bb_8e9a_71d9_600fb7dd5b02 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/HttpContentCompressorOptionsTest.java lines 93–118

    @Test
    void testGetSnappyTargetContentEncoding() {
        HttpContentCompressor compressor = new HttpContentCompressor(
                StandardCompressionOptions.gzip(),
                StandardCompressionOptions.deflate(),
                StandardCompressionOptions.brotli(),
                StandardCompressionOptions.zstd(),
                StandardCompressionOptions.snappy()
        );

        String[] tests = {
                // Accept-Encoding -> Content-Encoding
                "", null,
                "*;q=0.0", null,
                "snappy", "snappy",
                "compress, snappy;q=0.5", "snappy",
                "snappy; q=0.5, identity", "snappy",
                "snappy; q=0, deflate", "snappy",
        };
        for (int i = 0; i < tests.length; i += 2) {
            String acceptEncoding = tests[i];
            String contentEncoding = tests[i + 1];
            String targetEncoding = compressor.determineEncoding(acceptEncoding);
            assertEquals(contentEncoding, targetEncoding);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does testGetSnappyTargetContentEncoding() do?
testGetSnappyTargetContentEncoding() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentCompressorOptionsTest.java.
Where is testGetSnappyTargetContentEncoding() defined?
testGetSnappyTargetContentEncoding() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentCompressorOptionsTest.java at line 93.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free