Class Leb128

java.lang.Object
com.android.dex.Leb128

public final class Leb128 extends Object
Reads and writes DWARFv3 LEB 128 signed and unsigned integers. See DWARF v3 section 7.6.
  • Method Details

    • unsignedLeb128Size

      public static int unsignedLeb128Size(int value)
      Gets the number of bytes in the unsigned LEB128 encoding of the given value.
      Parameters:
      value - the value in question
      Returns:
      its write size, in bytes
    • readSignedLeb128

      public static int readSignedLeb128(ByteInput in)
      Reads an signed integer from in.
    • readUnsignedLeb128

      public static int readUnsignedLeb128(ByteInput in)
      Reads an unsigned integer from in.
    • writeUnsignedLeb128

      public static void writeUnsignedLeb128(ByteOutput out, int value)
      Writes value as an unsigned integer to out, starting at offset. Returns the number of bytes written.
    • writeSignedLeb128

      public static void writeSignedLeb128(ByteOutput out, int value)
      Writes value as a signed integer to out, starting at offset. Returns the number of bytes written.