#blob #base64

blob

Blob serialization/deserialization utilities

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

#6 in #blob

Download history 57/week @ 2021-07-04 57/week @ 2021-07-11 109/week @ 2021-07-18 59/week @ 2021-07-25 69/week @ 2021-08-01 67/week @ 2021-08-08 44/week @ 2021-08-15 49/week @ 2021-08-22 2/week @ 2021-08-29 8/week @ 2021-09-05 46/week @ 2021-09-12 58/week @ 2021-09-19 44/week @ 2021-09-26 29/week @ 2021-10-03 67/week @ 2021-10-10 38/week @ 2021-10-17

385 downloads per month
Used in 2 crates

MIT license

13KB
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

~440–600KB
~12K SLoC

G\