chickadee » describe » hexdump

hexdump bv start end ref outprocedure

Hexdump the contents of bytevector-like object BV from offset START to offset END, to output port OUT. REF is a procedure of two arguments, (obj i), which should return the byte value of OBJ at offset I.

An example of REF for a u8vector might be u8vector-ref. For string it might be (λ (obj i) (char->integer (string-ref obj i))), or even ##sys#byte if you want to live dangerously.

dump provides a high-level interface to this procedure.