Skip to main content

Crate gsm7_alt

Crate gsm7_alt 

Source
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§

Gsm7Config
Configuration options for GSM 7-bit encoding/decoding.

Enums§

Gsm7Error
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.