Home / Function/ computeRawVarint32Size() — netty Function Reference

computeRawVarint32Size() — netty Function Reference

Architecture documentation for the computeRawVarint32Size() function in ProtobufVarint32LengthFieldPrepender.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  9714be53_8fbd_3ba3_4cd4_53e89932050b["computeRawVarint32Size()"]
  c802204f_c6f7_7dc6_7b18_0b760262838a["ProtobufVarint32LengthFieldPrepender"]
  9714be53_8fbd_3ba3_4cd4_53e89932050b -->|defined in| c802204f_c6f7_7dc6_7b18_0b760262838a
  ed001db2_9529_f359_c93b_c3e10aed6648["encode()"]
  ed001db2_9529_f359_c93b_c3e10aed6648 -->|calls| 9714be53_8fbd_3ba3_4cd4_53e89932050b
  style 9714be53_8fbd_3ba3_4cd4_53e89932050b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-protobuf/src/main/java/io/netty/handler/codec/protobuf/ProtobufVarint32LengthFieldPrepender.java lines 79–93

    static int computeRawVarint32Size(final int value) {
        if ((value & (0xffffffff <<  7)) == 0) {
            return 1;
        }
        if ((value & (0xffffffff << 14)) == 0) {
            return 2;
        }
        if ((value & (0xffffffff << 21)) == 0) {
            return 3;
        }
        if ((value & (0xffffffff << 28)) == 0) {
            return 4;
        }
        return 5;
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does computeRawVarint32Size() do?
computeRawVarint32Size() is a function in the netty codebase, defined in codec-protobuf/src/main/java/io/netty/handler/codec/protobuf/ProtobufVarint32LengthFieldPrepender.java.
Where is computeRawVarint32Size() defined?
computeRawVarint32Size() is defined in codec-protobuf/src/main/java/io/netty/handler/codec/protobuf/ProtobufVarint32LengthFieldPrepender.java at line 79.
What calls computeRawVarint32Size()?
computeRawVarint32Size() 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