Skip to main content

Crate bluetape_rs_codec

Crate bluetape_rs_codec 

Source
Expand description

Codec and encoding helpers for bluetape-rs.

This crate is the 0.3.0 codec boundary. It starts with strict hexadecimal encoding and decoding plus focused Base64, Base58, and Base62 helpers, then grows into additional binary/text helpers in follow-up issues.

Planned APIs stay small and Rust-native:

  • strict hex encoding and decoding
  • Base64 standard and URL-safe variants
  • Base58 and byte-oriented Base62 variants
  • typed errors for caller-owned invalid encoded input
  • UTF-8 text/byte boundary helpers for codec call sites

Compression belongs to 0.4.0, and serde-oriented serialization belongs to 0.5.0. This crate does not provide those APIs.

// Enable the root facade when a single dependency is more convenient:
// bluetape-rs = { version = "0.1.1", features = ["codec"] }

Enums§

Base58DecodeError
Error returned when Base58 decoding rejects caller-owned input.
Base62DecodeError
Error returned when Base62 decoding rejects caller-owned input.
Base64DecodeError
Error returned when Base64 decoding rejects caller-owned input.
HexDecodeError
Error returned when strict hexadecimal decoding rejects caller-owned input.
TextDecodeError
Error returned when bytes cannot be decoded as UTF-8 text.

Functions§

decode_base58
Decodes Bitcoin Base58 text into bytes.
decode_base62
Decodes byte-oriented Base62 text into bytes.
decode_base64
Decodes standard Base64 text that uses the standard alphabet and padding.
decode_base64_unpadded
Decodes standard Base64 text that must not contain padding.
decode_base64_url
Decodes URL-safe Base64 text that uses = padding.
decode_base64_url_unpadded
Decodes URL-safe Base64 text that must not contain padding.
decode_hex
Decodes strict hexadecimal text into bytes.
decode_utf8_text
Decodes owned bytes into UTF-8 text without lossy replacement.
decode_utf8_text_lossy
Decodes bytes into UTF-8 text using replacement characters for invalid data.
encode_base58
Encodes bytes with the Bitcoin Base58 alphabet.
encode_base62
Encodes bytes with the bluetape Base62 alphabet.
encode_base64
Encodes bytes with the standard Base64 alphabet and = padding.
encode_base64_unpadded
Encodes bytes with the standard Base64 alphabet and no padding.
encode_base64_url
Encodes bytes with the URL-safe Base64 alphabet and = padding.
encode_base64_url_unpadded
Encodes bytes with the URL-safe Base64 alphabet and no padding.
encode_hex_lower
Encodes bytes as lowercase hexadecimal text.
encode_hex_upper
Encodes bytes as uppercase hexadecimal text.
encode_utf8_text
Encodes UTF-8 text into owned bytes.