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); }
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)); }