hxdmp

Crates.iohxdmp
lib.rshxdmp
version0.2.1
sourcesrc
created_at2020-03-06 17:37:44.992173
updated_at2021-12-07 22:01:57.138173
descriptionA small utility to create hexdump output from byte slices
homepagehttps://github.com/rustyhorde/hxdmp
repositoryhttps://github.com/rustyhorde/hxdmp
max_upload_size
id216114
size39,537
Jason Ozias (CraZySacX)

documentation

https://docs.rs/hxdmp

README

hxdmp

Generate a hexdump from a byte slice onto a given writer

Usage

let some_bytes = b"Hello, World! I'm hexy";
let mut buffer = Vec::new();
assert!(hexdump(some_bytes, &mut buffer).is_ok());
assert_eq!(
    r#"0000: 48 65 6C 6C 6F 2C 20 57 6F 72 6C 64 21 20 49 27  Hello,.World!.I'
0016: 6D 20 68 65 78 79                                m.hexy"#,
    String::from_utf8_lossy(&buffer)
);

Example Output

0000: 48 65 6C 6C 6F 2C 20 57 6F 72 6C 64 21 20 49 27  Hello,.World!.I'
0016: 6D 20 68 65 78 79                                m.hexy
Commit count: 5

cargo fmt