public void WriteTestStruct(WriteStream stream, ref TestStruct testStruct) { stream.Bool(testStruct.bool_value); stream.Int(testStruct.int_value, -100, 100); stream.Uint(testStruct.uint_value, 100, 1000); stream.Bits(testStruct.bits_value, 23); }