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

Remove Lzip because its incorrect, and improve extension comparison #198

Merged
merged 3 commits into from
Nov 14, 2021

Conversation

sigmaSd
Copy link
Contributor

@sigmaSd sigmaSd commented Nov 13, 2021

This pr does 2 things:

  • Remove lzip (lz) because its was considered by ouch to be lzma but according to https://en.wikipedia.org/wiki/List_of_file_signatures its actually lzip
  • Ignore display strings when comparing extensions, this especially useful for inferring because without it file that uses algorithms that can have different extensions wont be detected as equal (ex: lzma)

@sigmaSd sigmaSd changed the title Remove Lzip because its incorrect, and improve extention comparison Remove Lzip because its incorrect, and improve extension comparison Nov 13, 2021
@sigmaSd
Copy link
Contributor Author

sigmaSd commented Nov 13, 2021

lzip needs https://www.nongnu.org/lzip/lzlib.html

The sys-crate can easily be generated with bindgen, but I guess we would need a nice rusty wrapper.

src/utils/fs.rs Outdated Show resolved Hide resolved
@marcospb19 marcospb19 merged commit dc78c96 into ouch-org:master Nov 14, 2021
@figsoda figsoda mentioned this pull request Dec 7, 2021
@firasuke
Copy link

firasuke commented May 1, 2022

@sigmaSd I've opened #247 and I've been working on:

  • the low level crate lzip-sys which is mostly finished, the bindings were generated using bindgen then manually cleaned and modified a bit
  • the higher level crate lzip-rs is still being worked on while imitating what bzip2-rs and xz2-rs are doing

Let me hear your thoughts on this!

@sigmaSd
Copy link
Contributor Author

sigmaSd commented May 2, 2022

Hello @firasuke thanks for working on this

Personally I have no experience with those libraries and I see that you have already made some good progress.

I think you would have better chances asking bzip-2 and xz-2 maintainer for guidance.

Otherwise nice work looking forward for it to be used in ouch

@firasuke
Copy link

firasuke commented May 3, 2022

@sigmaSd Thanks!

Actually lzip-sys is done, all that's left is the higher level api lzip-rs which I also have no experience in implementing.

I also tried to get in contact with Alex (lead developer of xz2-rs and bzip2-rs) to no avail.

Perhaps someone with more experience in Rust can give us their thoughts on this.

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.

None yet

4 participants