hexy

Crates.iohexy
lib.rshexy
version0.1.4
sourcesrc
created_at2021-02-07 02:39:30.570795
updated_at2022-09-07 02:53:48.60644
descriptionA rust library for printing hexy hex dumps with colors based on the byte values
homepage
repositoryhttps://github.com/genonullfree/hexy
max_upload_size
id351771
size5,102
geno (genonullfree)

documentation

README

hexy

This is a simple utility that can print a byte as an ASCII char or hex value. It will change the color of the byte based on the byte value.
This can be used with some builtin functions to provide a hexdump-like interface, or for byte-by-byte hex value or ASCII character printing.

Usage as a library

[dependencies]
hexy = "0.1.2"

API

//! This reads in 512 byte chunks and prints as a colorful hexdump
//! input: Must implement the Read trait
pub fn hexyfile<T: std::io::Read>(mut input: T) -> usize

//! This prints the colorful hexdump
//! a: byte slice
//! length: label for left column
//! piece: size of chunk
pub fn hexydump(a: &[u8], length: &usize, piece: &usize)

//! This prints a single u8 as a colorful char, if possible, else a '.'
pub fn hexy_c(a: &u8)

//! This prints a single u8 as a colorful hex byte {:02x}
pub fn hexy_x(a: &u8)
Commit count: 32

cargo fmt