Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Squeeze identical lines #213

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

sharifhsn
Copy link
Contributor

Fixes #186.

This brings the squeezing feature to parity with hexdump. Lines that contain identical data should be squeezed, not just when they are all filled with a single byte.

@sharkdp
Copy link
Owner

sharkdp commented Dec 12, 2023

Thank you very much!

Some tests are currently failing..

@sharifhsn
Copy link
Contributor Author

Looks like the issues are on 32-bit systems. I'll investigate.

@sharkdp
Copy link
Owner

sharkdp commented Sep 8, 2024

Note: there is also #218

@@ -281,7 +281,8 @@ pub struct Printer<'a, Writer: Write> {
display_offset: u64,
/// The number of panels to draw.
panels: u64,
squeeze_byte: usize,
squeeze_byte: Option<usize>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing this (as well as some other code below) from usize to u64 fixes the tests on 32-bit platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Identical lines not squeezed
3 participants