Methods Summary |
---|
public void | writeBool(boolean value, java.lang.String string)
Debug.print(string + "\t");
write1Bit(value ? 1 : 0);
Debug.println("\t" + value);
|
public void | writeNBit(long value, int n, java.lang.String string)
Debug.print(string + "\t");
for (int i = 0; i < n; i++) {
write1Bit((int) (value >> (n - i - 1)) & 0x1);
}
Debug.println("\t" + value);
|
public void | writeSE(int value, java.lang.String string)
Debug.print(string + "\t");
writeUE((value << 1) * (value < 0 ? -1 : 1) + (value > 0 ? 1 : 0));
Debug.println("\t" + value);
|
public void | writeSliceTrailingBits()
throw new IllegalStateException("todo");
|
public void | writeTrailingBits()
write1Bit(1);
writeRemainingZero();
flush();
|
public void | writeU(int value, int n, java.lang.String string)
Debug.print(string + "\t");
writeNBit(value, n);
Debug.println("\t" + value);
|
public void | writeU(int i, int n)
writeNBit(i, n);
|
public void | writeUE(int value)
int bits = 0;
int cumul = 0;
for (int i = 0; i < 15; i++) {
if (value < cumul + (1 << i)) {
bits = i;
break;
}
cumul += (1 << i);
}
writeNBit(0, bits);
write1Bit(1);
writeNBit(value - cumul, bits);
|
public void | writeUE(int value, java.lang.String string)
Debug.print(string + "\t");
writeUE(value);
Debug.println("\t" + value);
|