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

Autodetect NAR compression #4534

Open
edolstra opened this issue Feb 9, 2021 · 4 comments
Open

Autodetect NAR compression #4534

edolstra opened this issue Feb 9, 2021 · 4 comments

Comments

@edolstra
Copy link
Member

edolstra commented Feb 9, 2021

Followup to #4464. Re-uploading a NAR with a different compression method invalidates the (cached) .narinfo, so it's better if we get rid of the Compression field and autodetect the compression method.

@zimbatm
Copy link
Member

zimbatm commented Feb 9, 2021

It might be helpful to upload the NAR files with the Content-Encoding header set, for that purpose. That way it's possible to query the compression without downloading the file and looking for magic headers. Or use the Content-Type. S3 supports recording both of those (as does Google Storage).

@edolstra
Copy link
Member Author

edolstra commented Feb 9, 2021

That would only work for HTTP, but we shouldn't need it since the first few bytes allow the compression method to be detected. Hopefully we can use libarchive for this (see #3333).

@flokli
Copy link
Contributor

flokli commented Mar 10, 2021

Brotli seems to have no standardized framing format, according to google/brotli#298 and the followup questions.

I wonder if we still want to keep support for uploading, and if so, strongly discourage using it in places where we can't set the Content-Type to facilitate the format detection.

@stale
Copy link

stale bot commented Sep 10, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Sep 10, 2021
@stale stale bot removed the stale label Dec 5, 2022
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

4 participants