Skip to content

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

Merged
marcospb19 merged 3 commits into
ouch-org:masterfrom
sigmaSd:infer2
Nov 14, 2021
Merged

Remove Lzip because its incorrect, and improve extension comparison#198
marcospb19 merged 3 commits into
ouch-org:masterfrom
sigmaSd:infer2

Conversation

@sigmaSd

@sigmaSd sigmaSd commented Nov 13, 2021

Copy link
Copy Markdown
Contributor

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

sigmaSd commented Nov 13, 2021

Copy link
Copy Markdown
Contributor Author

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.

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

firasuke commented May 1, 2022

Copy link
Copy Markdown

@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

sigmaSd commented May 2, 2022

Copy link
Copy Markdown
Contributor Author

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

firasuke commented May 3, 2022

Copy link
Copy Markdown

@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.

4 participants