Home / Function/ maxOutputBufferLength() — netty Function Reference

maxOutputBufferLength() — netty Function Reference

Architecture documentation for the maxOutputBufferLength() function in LzmaFrameEncoder.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  8a3b26a2_22a8_e061_7150_1eb375301713["maxOutputBufferLength()"]
  7c9ec182_4df7_b0e1_b1a7_861a5a612786["LzmaFrameEncoder"]
  8a3b26a2_22a8_e061_7150_1eb375301713 -->|defined in| 7c9ec182_4df7_b0e1_b1a7_861a5a612786
  d26f5bcc_2a66_b7f8_d1e3_e9e2eb77d7fe["ByteBuf()"]
  d26f5bcc_2a66_b7f8_d1e3_e9e2eb77d7fe -->|calls| 8a3b26a2_22a8_e061_7150_1eb375301713
  style 8a3b26a2_22a8_e061_7150_1eb375301713 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-compression/src/main/java/io/netty/handler/codec/compression/LzmaFrameEncoder.java lines 198–212

    private static int maxOutputBufferLength(int inputLength) {
        double factor;
        if (inputLength < 200) {
            factor = 1.5;
        } else if (inputLength < 500) {
            factor = 1.2;
        } else if (inputLength < 1000) {
            factor = 1.1;
        } else if (inputLength < 10000) {
            factor = 1.05;
        } else {
            factor = 1.02;
        }
        return 13 + (int) (inputLength * factor);
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does maxOutputBufferLength() do?
maxOutputBufferLength() is a function in the netty codebase, defined in codec-compression/src/main/java/io/netty/handler/codec/compression/LzmaFrameEncoder.java.
Where is maxOutputBufferLength() defined?
maxOutputBufferLength() is defined in codec-compression/src/main/java/io/netty/handler/codec/compression/LzmaFrameEncoder.java at line 198.
What calls maxOutputBufferLength()?
maxOutputBufferLength() is called by 1 function(s): ByteBuf.

Analyze Your Own Codebase

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

Try Supermodel Free