Open GrayHatter opened 3 weeks ago
Editing/creating binaries was never the goal of hevi. That said, I think this use case doesn't interfere with the dump functionality. Thus, I am willing to consider implementing this. How would it work exactly? Would it have to parse the output format? What about flags like --offset/--no-offset
? Those would make parsing difficult, although I guess we could use the |
characters. So, a line would either be [offset] | <data> | [ascii]
or <data>
(for raw mode).
Also, from the example, I assume it should handle non-normalized lines (>16 bytes), am I right?
Quite often I find myself reading a binary file into vim, editing it through
xxd
and trying to return that new hex text file back to binary. When I append into the middle of some data, it often breaks the counting, which breaks xxd. e.g.starting with
editing to
causes xdd to error instead of parsing the hex. I'd like to have a flag that would allow hevi to parse it, and generate the binary.
Bonus points if it could detect mistakes and output the formatting back to vim with the error inline where detected. Or it could return an error, and the result suggestion and require the user to approve/fix it.