ByteBuffer has awesome hexdump(format: .detailed | .plain) formats (from #2475). They're awesome and I use them all the time. But there's one format that I think is quite useful: A compact one without spaces. So
Why is compact so important? Frequently, UNIX tools output formats that are easy to split using cut -d' ' -f2 or awk '{ print $2 }' or while read -r line prefix hex; do echo "$hex"; done. But all these require that there's no whitespace in the hexdump.
So I think we should add another format which is exactly like .plain but doesn't emit spaces or any other whitespace. #2475 made great groundwork here and this should be very easy to add.
ByteBuffer has awesome
hexdump(format: .detailed | .plain)
formats (from #2475). They're awesome and I use them all the time. But there's one format that I think is quite useful: A compact one without spaces. SoWhy is compact so important? Frequently, UNIX tools output formats that are easy to split using
cut -d' ' -f2
orawk '{ print $2 }'
orwhile read -r line prefix hex; do echo "$hex"; done
. But all these require that there's no whitespace in the hexdump.So I think we should add another format which is exactly like
.plain
but doesn't emit spaces or any other whitespace. #2475 made great groundwork here and this should be very easy to add.