Home / Function/ writeBlockData() — netty Function Reference

writeBlockData() — netty Function Reference

Architecture documentation for the writeBlockData() function in Bzip2HuffmanStageEncoder.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  8f0c4b68_6a3a_9507_84d8_686601b8a5e9["writeBlockData()"]
  9201fec0_464b_c827_7f9e_b36517971a73["Bzip2HuffmanStageEncoder"]
  8f0c4b68_6a3a_9507_84d8_686601b8a5e9 -->|defined in| 9201fec0_464b_c827_7f9e_b36517971a73
  6e4766a4_37c9_7b63_401b_81d6c95ccc03["encode()"]
  6e4766a4_37c9_7b63_401b_81d6c95ccc03 -->|calls| 8f0c4b68_6a3a_9507_84d8_686601b8a5e9
  style 8f0c4b68_6a3a_9507_84d8_686601b8a5e9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-compression/src/main/java/io/netty/handler/codec/compression/Bzip2HuffmanStageEncoder.java lines 341–357

    private void writeBlockData(ByteBuf out) {
        final Bzip2BitWriter writer = this.writer;
        final int[][] huffmanMergedCodeSymbols = this.huffmanMergedCodeSymbols;
        final byte[] selectors = this.selectors;
        final int mtfLength = this.mtfLength;

        int selectorIndex = 0;
        for (int mtfIndex = 0; mtfIndex < mtfLength;) {
            final int groupEnd = Math.min(mtfIndex + HUFFMAN_GROUP_RUN_LENGTH, mtfLength) - 1;
            final int[] tableMergedCodeSymbols = huffmanMergedCodeSymbols[selectors[selectorIndex++]];

            while (mtfIndex <= groupEnd) {
                final int mergedCodeSymbol = tableMergedCodeSymbols[mtfBlock[mtfIndex++]];
                writer.writeBits(out, mergedCodeSymbol >>> 24, mergedCodeSymbol);
            }
        }
    }

Domain

Subdomains

Called By

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free