#hex-dump #byte-slice #writer #hex #onto #hello #20

hxdmp

A small utility to create hexdump output from byte slices

2 unstable releases

0.2.1 Dec 7, 2021
0.2.0 Dec 7, 2021
0.1.0 Mar 6, 2020

#1974 in Encoding

Download history 2401/week @ 2025-03-08 6497/week @ 2025-03-15 13422/week @ 2025-03-22 9306/week @ 2025-03-29 12410/week @ 2025-04-05 11392/week @ 2025-04-12 11596/week @ 2025-04-19 7859/week @ 2025-04-26 10321/week @ 2025-05-03 9536/week @ 2025-05-10 4746/week @ 2025-05-17 8244/week @ 2025-05-24 13666/week @ 2025-05-31 13679/week @ 2025-06-07 10597/week @ 2025-06-14 11195/week @ 2025-06-21

50,678 downloads per month
Used in 20 crates (8 directly)

MIT/Apache

28KB
413 lines

hxdmp

A small utility to create hexdump output from byte slices on the given writer.

Example

#
    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)
    );

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

No runtime deps