mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-01-20 09:17:29 +07:00
Implemented writeBoolean(boolean) and write1(int) methods to write a single bit
This commit is contained in:
parent
4a00f0207f
commit
2433fac1fe
@ -138,6 +138,15 @@ public class BitOutput {
|
||||
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) {
|
||||
BitConstraints.validate8(bits);
|
||||
_writeSigned(value, bits);
|
||||
|
Loading…
Reference in New Issue
Block a user