Crate ctb_formats_dctf

Crate ctb_formats_dctf 

Source
Expand description

DcTF and legacy DcUtf / “UTF-8e-128” encoding and decoding (UTF-8 extended to 128-bit integers)

Constants§

MAX_DCTF_LEN
Maximum byte length of a DcTF (.dctf, f641) character sequence (23 bytes for 128-bit values).

Traits§

DecodeDcutfIpcClientExt
Auto-generated IPC client extension for this method.
DecodeIpcClientExt
Auto-generated IPC client extension for this method.
EncodeDcutfIpcClientExt
Auto-generated IPC client extension for this method.
EncodeIpcClientExt
Auto-generated IPC client extension for this method.

Functions§

decode
Lossily decode the first character from bytes using the DcTF format.
decode_dctf
Decodes one DcTF (.dctf, f641) codepoint from bytes, or returns (0xFFFD, error_len) using maximal-subpart error recovery on ill-formed input.
decode_dctf_buf
Decodes one DcTF (.dctf, f641) character from the provided byte slice.
decode_dcutf
Lossily decode the first character from bytes using the legacy DcUtf (utf_8e_128) format.
decode_utf_8e_128
Decodes one generalized UTF-8 codepoint from bytes. Returns Some((value, length_consumed)), or the replacement character on error.
decode_utf_8e_128_buf
Decodes one UTF‑8 / UTF‑8e‑128 codepoint from the provided byte slice. On success returns Some((value, length_consumed)), else None. Enforces canonical (no overlong) encodings for both standard and extended forms.
determine_dctf_error_len
Computes the maximal-subpart error length for an invalid or incomplete DcTF (.dctf, f641) byte slice.
determine_utf_8e_128_error_len
Computes the maximal-subpart error length for an invalid or incomplete legacy UTF-8e-128 (DcUtf, f89) byte slice.
encode
Encode a u128 codepoint using the DcTF format.
encode_dctf
Encodes codepoint in DcTF (.dctf, f641) and returns a Vec<u8>.
encode_dctf_buf
Encodes a 128-bit Document Character / integer value using the DcTF (.dctf, f641) scheme.
encode_dcutf
Encode a u128 codepoint using the utf_8e_128 format.
encode_utf_8e_128
Generalized UTF-8 encoding for u128. Returns a Vec<u8> containing the encoded bytes.
encode_utf_8e_128_buf
Encodes a Unicode scalar value or an extended (> U+10FFFF) 128‑bit integer using the UTF‑8e‑128 scheme.
len_dctf
Returns the encoded byte length of codepoint in DcTF (.dctf, f641).
len_utf_8e_128
Returns the encoded byte length of codepoint in legacy UTF-8e-128 (DcUtf, f89).