Function opentitanlib::util::hexdump::hexdump
source · pub fn hexdump(writer: impl Write, buf: &[u8]) -> Result<()>
Expand description
Print a hexdump of a buffer to writer
.
The hexdump includes the offset, hex bytes and printable ASCII characters.
00000000: 53 46 44 50 06 01 02 ff 00 06 01 10 30 00 00 ff SFDP……..0… 00000010: c2 00 01 04 10 01 00 ff 84 00 01 02 c0 00 00 ff ……………. 00000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ……………. 00000030: e5 20 fb ff ff ff ff 3f 44 eb 08 6b 08 3b 04 bb . …..?D..k.;..
Note: This format can be consumed by xxd -r
and converted back into binary.