Package com.android.dex
Class Leb128
java.lang.Object
com.android.dex.Leb128
Reads and writes DWARFv3 LEB 128 signed and unsigned integers. See DWARF v3
section 7.6.
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
Reads an signed integer fromin
.static int
Reads an unsigned integer fromin
.static int
unsignedLeb128Size
(int value) Gets the number of bytes in the unsigned LEB128 encoding of the given value.static void
writeSignedLeb128
(ByteOutput out, int value) Writesvalue
as a signed integer toout
, starting atoffset
.static void
writeUnsignedLeb128
(ByteOutput out, int value) Writesvalue
as an unsigned integer toout
, starting atoffset
.
-
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
Reads an signed integer fromin
. -
readUnsignedLeb128
Reads an unsigned integer fromin
. -
writeUnsignedLeb128
Writesvalue
as an unsigned integer toout
, starting atoffset
. Returns the number of bytes written. -
writeSignedLeb128
Writesvalue
as a signed integer toout
, starting atoffset
. Returns the number of bytes written.
-