5 unstable releases

Uses old Rust 2015

0.3.0 Jan 22, 2019
0.2.1 Jan 22, 2019
0.2.0 May 5, 2017
0.1.1 Feb 4, 2017
0.1.0 Feb 4, 2017

#15 in #serialization-deserialization

Download history 35/week @ 2023-11-27 34/week @ 2023-12-04 40/week @ 2023-12-11 37/week @ 2023-12-18 16/week @ 2023-12-25 7/week @ 2024-01-01 37/week @ 2024-01-08 24/week @ 2024-01-15 17/week @ 2024-01-22 29/week @ 2024-01-29 71/week @ 2024-02-05 49/week @ 2024-02-12 70/week @ 2024-02-19 77/week @ 2024-02-26 90/week @ 2024-03-04 113/week @ 2024-03-11

357 downloads per month
Used in 2 crates

MIT license

14KB
324 lines

blob

This crate provides a dedicated Blob structure for use in storing, encoding and decoding to/from base-64, with support for type-level encoding configurations suitable for url-safe base-64.

When serializing, it will encode the binary data as base-64, and when deserializing it can either read and decode a base-64 encoded string or a raw sequence of bytes.

Example using FromStr::from_str:

extern crate blob;

use std::str::FromStr;

use blob::Blob;

fn main() {
    let my_blob: Blob = Blob::from_str("AQIDBAU=").unwrap();

    assert_eq!(my_blob, [1, 2, 3, 4, 5]);
}

lib.rs:

Blob

This crate provides a dedicated Blob structure for use in storing, encoding and decoding to/from base-64, with support for type-level encoding configurations suitable for url-safe base-64.

When serializing, it will encode the binary data as base-64, and when deserializing it can either read and decode a base-64 encoded string or a raw sequence of bytes.

Example using FromStr::from_str:

extern crate blob;

use std::str::FromStr;

use blob::Blob;

fn main() {
    let my_blob: Blob = Blob::from_str("AQIDBAU=").unwrap();

    assert_eq!(my_blob, [1, 2, 3, 4, 5]);
}

Dependencies

~450–720KB
~14K SLoC