Expand description
GSM 7-bit character encoding and decoding library.
This library provides efficient encoding and decoding of text using the GSM 7-bit character set as defined in GSM 03.38. This encoding is commonly used in SMS messages.
§Example
use gsm7::{encode, decode};
let text = "Hello {world} €!";
let encoded = encode(text)?;
let decoded = decode(&encoded)?;
assert_eq!(decoded, text);Structs§
- Gsm7
Config - Configuration options for GSM 7-bit encoding/decoding.
Enums§
- Gsm7
Error - Errors that can occur during GSM 7-bit encoding/decoding operations.
Functions§
- decode
- Decode GSM 7-bit encoded bytes to a string.
- decode_
with_ config - Decode GSM 7-bit encoded bytes to a string with custom configuration.
- encode
- Encode a string using GSM 7-bit encoding.
- encode_
with_ config - Encode a string using GSM 7-bit encoding with custom configuration.
- encoded_
len - Calculate the number of bytes required to encode a string in GSM 7-bit.
- is_
gsm7_ compatible - Check if a string can be encoded in GSM 7-bit without errors.
Type Aliases§
- Result
- Result type for GSM 7-bit operations.