mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-04 07:17:26 +07:00
Implemented writeBoolean(boolean) and write1(int) methods to write a single bit
This commit is contained in:
@ -138,6 +138,15 @@ public class BitOutput {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BitOutput writeBoolean(boolean b) {
|
||||||
|
return write1(b ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public BitOutput write1(int value) {
|
||||||
|
_writeRaw(value, 1);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public BitOutput write8(int value, int bits) {
|
public BitOutput write8(int value, int bits) {
|
||||||
BitConstraints.validate8(bits);
|
BitConstraints.validate8(bits);
|
||||||
_writeSigned(value, bits);
|
_writeSigned(value, bits);
|
||||||
|
Reference in New Issue
Block a user