yxd
yxd copied to clipboard
add Autoskip mode
this cleans up the logic for generating individual dump lines, at the cost of complicating the main dump loop to implement autoskip mode. Presently it does not handle "the very last line is also nulls" in the same way that xxd does, but it works well enough for our purposes:
atax1a@tecpatl:~/package/yxd π PYTHONPATH=. python3 yxd.py -a /tmp/b
00000000│0000 0000 0000 0000│0000 0000 0000 0000│................
*
atax1a@tecpatl:~/package/yxd π xxd -a /tmp/b
00000000: 0000 0000 0000 0000 0000 0000 0000 0000 ................
*
000001f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................