public final class Leb128 extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
readSignedLeb128(ByteInput in)
Reads an signed integer from
in. |
static int |
readUnsignedLeb128(ByteInput in)
Reads an unsigned integer from
in. |
static int |
signedLeb128Size(int value)
Gets the number of bytes in the signed LEB128 encoding of the
given value.
|
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)
Writes
value as a signed integer to out, starting at
offset. |
static void |
writeUnsignedLeb128(ByteOutput out,
int value)
Writes
value as an unsigned integer to out, starting at
offset. |
public static int unsignedLeb128Size(int value)
value - the value in questionpublic static int signedLeb128Size(int value)
value - the value in questionpublic static int readSignedLeb128(ByteInput in)
in.public static int readUnsignedLeb128(ByteInput in)
in.public static void writeUnsignedLeb128(ByteOutput out, int value)
value as an unsigned integer to out, starting at
offset. Returns the number of bytes written.public static void writeSignedLeb128(ByteOutput out, int value)
value as a signed integer to out, starting at
offset. Returns the number of bytes written.Copyright © 2016. All Rights Reserved.