pricklybirdlib 1.0.0

Library to convert between binary data and pricklybird strings.
Documentation
  • Coverage
  • 100%
    15 out of 15 items documented6 out of 8 items with examples
  • Size
  • Source code size: 25.65 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.02 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 14s Average build duration of successful builds.
  • all releases: 14s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • ndornseif/rspricklybird
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ndornseif

rspricklybird

Overview

This repository contains a rust implementation of the pricklybird format version v1 in the pricklybirdlib crate.

It also provides a command line utility to convert from and to pricklybird strings called prbiconv.

prbiconv

Usage

prbiconv is a command line utility for conversion that is written in rust and uses pricklybirdlib in the background. Input is read from stdin and output written to stdout.

By default conversion from pricklybird string to bytes is attempted. This can be explicitly set using the -b flag. We use xxd in these examples to convert raw binary to hexadecimal.

% echo "flea-flux-full" | prbiconv -b | xxd -ps
4243

To convert bytes to a pricklybird string use the -p flag.

% echo "4243" | xxd -r -p | prbiconv -p
flea-flux-full

Building from source

git clone https://github.com/ndornseif/rspricklybird.git
cd rspricklybird/prbiconv
cargo build --release

pricklybirdlib

Usage

use pricklybirdlib::{convert_to_pricklybird, convert_from_pricklybird};
let data = [0x42_u8, 0x43];
let code = convert_to_pricklybird(&data);
assert_eq!("flea-flux-full", code);
let recovered_data = convert_from_pricklybird(&code).unwrap();
assert_eq!(vec![0x42, 0x43], recovered_data);

License

rspricklybird, pricklybirdlib and prbiconv are distributed under the terms of the MIT license.