You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: Binary string diffing support #298
When comparing binary strings (ASCII-8BIT encoding), super_diff shows unreadable output with escape sequences and control characters. This is common when testing file formats, network protocols, or any binary data.
Proposed solution
Add built-in support for binary string diffing that:
Detects binary strings - Strings with Encoding::ASCII_8BIT
Displays as hex dump - Shows offset, hex bytes, and printable ASCII:
I like this style of output, but this would be a big change from how binary strings are currently displayed. To avoid breaking people's expectations too much, I'd accept a PR to add this as an opt-in feature.
I took a quick look at your code and see you're doing something similar to a lesser-known feature of SuperDiff called diff elision. Would you be able to incorporate this into your PR? (Though I'm not sure if it will work with multi-line strings as currently written.)
Activity
jas14 commentedon Feb 2, 2026
Hi @gschlager , thanks for the suggestion!
I like this style of output, but this would be a big change from how binary strings are currently displayed. To avoid breaking people's expectations too much, I'd accept a PR to add this as an opt-in feature.
I took a quick look at your code and see you're doing something similar to a lesser-known feature of SuperDiff called diff elision. Would you be able to incorporate this into your PR? (Though I'm not sure if it will work with multi-line strings as currently written.)
Add opt-in binary string diff support
Add opt-in binary string diff support
Add opt-in binary string diff support
gschlager commentedon Feb 5, 2026
Thanks for the tip regarding diff elision. I created #300 and #301 which should solve this.
jas14 commentedon May 1, 2026
Implemented in #301 and released in v0.19.0 (today)!