Home / Function/ testGetZstdTargetContentEncoding() — netty Function Reference

testGetZstdTargetContentEncoding() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/http/HttpContentCompressorOptionsTest.java lines 66–91

    @Test
    void testGetZstdTargetContentEncoding() {
        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,
                "zstd", "zstd",
                "compress, zstd;q=0.5", "zstd",
                "zstd; q=0.5, identity", "zstd",
                "zstd; q=0, deflate", "zstd",
        };
        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 testGetZstdTargetContentEncoding() do?
testGetZstdTargetContentEncoding() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentCompressorOptionsTest.java.
Where is testGetZstdTargetContentEncoding() defined?
testGetZstdTargetContentEncoding() is defined in codec-http/src/test/java/io/netty/handler/codec/http/HttpContentCompressorOptionsTest.java at line 66.

Analyze Your Own Codebase

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

Try Supermodel Free