FireyFly/pixd

Add option to skip blocks of 0 bytes

Opened this issue · 1 comments

Some files (e.g. disk images) can have very large runs of 0 bytes. It would be nice to have an option to omit these - e.g. the BSD hexdump by default emits a * for arbitrarily large groups of zero bytes:

00000250  04 00 00 00 80 00 00 00  33 5b 58 fd 00 00 00 00  |........3[X.....|
00000260  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000400  28 73 2a c1 1f f8 d2 11  ba 4b 00 a0 c9 3e c9 3b  |(s*......K...>.;|
00000410  7f 1b 07 69 76 54 e7 11  a3 8b 90 2b 34 36 13 49  |...ivT.....+46.I|

Hm, hexd does this automatically but i removed it from pixd since it doesn't make as much sense when the output is graphical, at least to me, and it also gets a bit tricky with the way output currently works since I use ‘▀’ to output two "pixels" in each character cell.

In principle it could be added back though, perhaps it'd be a good idea to have it as an option like you say.