public void write_bits(WriteStream stream, ulong value, int bits) { stream.SerializeBits(value, bits); }
// write public void write_bool(WriteStream stream, bool value) { uint unsigned_value = (value == true) ? 1U : 0U; stream.SerializeBits(unsigned_value, 1); }