public void Test_ReadChar()
        {
            BitStreamWriter writer = new BitStreamWriter(stream);
            BitStreamReader reader = new BitStreamReader(stream);

            writer.Write('x');
            char result = reader.ReadChar(_fixture.index);

            _fixture.index += 8;

            Assert.Equal('x', result);
        }
Ejemplo n.º 2
0
    public static string ReadString(this BitStreamReader reader)
    {
        UInt32        size          = reader.ReadUInt32();
        StringBuilder stringBuilder = new StringBuilder((int)size);

        for (int i = 0; i < size; i++)
        {
            stringBuilder.Append(reader.ReadChar());
        }

        return(stringBuilder.ToString());
    }
 public static void Deserialize(ref Char value, BitStreamReader reader) => value = reader.ReadChar();