sharkdp / hexyl

A command-line hex viewer
Apache License 2.0
8.93k stars 227 forks source link

Adds squeeze support #59

Closed awidegreen closed 5 years ago

awidegreen commented 5 years ago

The squeeze feature is implement as for hexdump. Reoccurring lines will be squeezed together and visualized with an asterisk. Further hexyl received an additional command line argument -v|--no-squeezing to disable squeezing. Squeezing is enabled by default.

If the squeezing goes until the end of the input data, an empty line with address next to last line will be printed to indicate the highest address (again similar to hexdump).

Implements #53 except the compressing applies to all possible values, not just 0.

Some example outputs: image image image

sharkdp commented 5 years ago

Thank you very much for working on this! I fixed some of the conflicts, but then made some changes again. It would be great if you could fix the remaining conflicts and update the branch such that it respects the changes in #54, i.e. uses the non-hardcoded border elements.

If you don't find the time to update the branch, let us know.

awidegreen commented 5 years ago

Rebased and changed command line option to -v | --no-squeezing

sharkdp commented 5 years ago

Thank you very much!