Transforms bytes into a sequence of hexdump lines with configurable number of columns and address offset. Uses {@link @thi.ng/transducers#(partition:1)} internally, so new lines are only produced once filled. If the input hasn't an exact multiple of cols bytes, the last line will be padded with zeroes.
Transforms bytes into a sequence of hexdump lines with configurable number of
columns
andaddress
offset. Uses {@link @thi.ng/transducers#(partition:1)} internally, so new lines are only produced once filled. If the input hasn't an exact multiple ofcols
bytes, the last line will be padded with zeroes.src = [65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 33, 48, 49, 50, 51, 126, 122, 121, 120] [...hexDump({ cols: 8, address: 0x400 }, src)] // [ '00000400 | 41 42 43 44 45 46 47 48 | ABCDEFGH', // '00000408 | 49 4a 21 30 31 32 33 7e | IJ!0123~', // '00000410 | 7a 79 78 00 00 00 00 00 | zyx.....' ]