mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-01-20 09:17:29 +07:00
Function ordering
This commit is contained in:
parent
148a8e108e
commit
fa2594048c
@ -135,31 +135,11 @@ public class BitStream {
|
||||
return value;
|
||||
}
|
||||
|
||||
public long read64BitsOrLess(int bits) {
|
||||
assert bits <= Long.SIZE;
|
||||
return readUnsigned(bits);
|
||||
}
|
||||
|
||||
public int read32BitsOrLess(int bits) {
|
||||
assert bits <= Integer.SIZE;
|
||||
return (int) readUnsigned(bits);
|
||||
}
|
||||
|
||||
public short read16BitsOrLess(int bits) {
|
||||
assert bits <= Short.SIZE;
|
||||
return (short) readUnsigned(bits);
|
||||
}
|
||||
|
||||
public byte readUnsigned7OrLess(int bits) {
|
||||
assert bits <= Byte.SIZE - 1;
|
||||
return (byte) readUnsigned(bits);
|
||||
}
|
||||
|
||||
public int readUnsigned8OrLess(int bits) {
|
||||
assert bits <= Byte.SIZE;
|
||||
return (int) readUnsigned(bits);
|
||||
}
|
||||
|
||||
public short readUnsigned15OrLess(int bits) {
|
||||
assert bits <= Short.SIZE - 1;
|
||||
return (short) readUnsigned(bits);
|
||||
@ -170,6 +150,26 @@ public class BitStream {
|
||||
return (int) readUnsigned(bits);
|
||||
}
|
||||
|
||||
public int readUnsigned8OrLess(int bits) {
|
||||
assert bits <= Byte.SIZE;
|
||||
return (int) readUnsigned(bits);
|
||||
}
|
||||
|
||||
public short read16BitsOrLess(int bits) {
|
||||
assert bits <= Short.SIZE;
|
||||
return (short) readUnsigned(bits);
|
||||
}
|
||||
|
||||
public int read32BitsOrLess(int bits) {
|
||||
assert bits <= Integer.SIZE;
|
||||
return (int) readUnsigned(bits);
|
||||
}
|
||||
|
||||
public long read64BitsOrLess(int bits) {
|
||||
assert bits <= Long.SIZE;
|
||||
return readUnsigned(bits);
|
||||
}
|
||||
|
||||
public int readSigned(int bits) {
|
||||
int shift = Integer.SIZE - bits;
|
||||
return ((int) readUnsigned(bits)) << shift >> shift;
|
||||
|
Loading…
Reference in New Issue
Block a user