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

Additional formats/detections #16

Open
luizirber opened this issue Apr 24, 2020 · 6 comments
Open

Additional formats/detections #16

luizirber opened this issue Apr 24, 2020 · 6 comments

Comments

@luizirber
Copy link
Owner

Check what other crates are available and do the sniffing for additional formats. Some examples:
https://stackoverflow.com/questions/19120676/how-to-detect-type-of-compression-used-on-the-file-if-no-file-extension-is-spe

(suggested by @chrisgulvik on slack, thanks!)

@natir
Copy link
Collaborator

natir commented Apr 24, 2020

@luizirber
Copy link
Owner Author

https://github.com/gwihlidal/smush-rs has a different API (no Read/Write), but shares some of the ideas and supports more formats.

@natir
Copy link
Collaborator

natir commented Apr 26, 2020

We can add smush-rs in readme and by inspired by it but can't use it at backend badly (maybe discuse with author to see if we can merge our project).

@luizirber
Copy link
Owner Author

Brotli: https://github.com/dropbox/rust-brotli
Already have Read and Write traits implemented, should be easy to add

@dsully
Copy link

dsully commented Oct 4, 2023

What about tar wrapped files and zips?

@natir
Copy link
Collaborator

natir commented Oct 4, 2023

I'm not opposed in principle. But there are many problems:

How do we manage the multiple content files, we concatenate files? How do we determine the file order? How do we represent the folder structure? If we start managing all this, we're leaving the niffler scoop.

We could just do the format detection part. But for a tar file, for example, it's a wrapper around a file concatenation and the saving of the folder structure, then compressed in the chosen format. To detect that it's a tar file, you'd have to detect the compression, then open the file with the right parser and read the beginning to detect that it's a tar file. There's no technical impossibility in doing all this, but I'm not sure we're still on the niffler scoop.

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

No branches or pull requests

3 participants