示例#1
0
        private string DeserializeString(BitReader bitReader, int length, bool onlyCharacters = true)
        {
            var bytes = bitReader.ReadBytes(length, bitLength: onlyCharacters ? 5 : 6);
            var value = FloEncoding.GetString(bytes, onlyCharacters);

            return(value);
        }
示例#2
0
        private void SerializeType(BitWriter bitWriter, string value)
        {
            var bytes = FloEncoding.GetBytes(value, onlyCharacters: true);

            bitWriter.WriteBits(bytes, value.Length * 5);
        }
        private void SerializeType(BitWriter bitWriter, string value, bool onlyCharacters = false)
        {
            var bytes = FloEncoding.GetBytes(value, onlyCharacters);

            bitWriter.WriteBits(bytes, value.Length * (onlyCharacters ? 5 : 6));
        }