-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add brotli mime type detection to file and libmagic #727
Comments
There is a little problem. Most utilities scan first file bytes and compare them against "magic" bytes. Brotli was designed to be "stream" format rather than file format. There is a "brotli-framing-format" project that adds tons of features (including "magic header bytes")... but it is not public yet. |
If I understood correctly gzip is also can be named as stream format but this is not a problem for them to add few magic bytes. Where can I read at least something about this framing format? Will we still be able to use regular .br files? |
|
So, the magic bytes which I used are actually from another framing format from #462 |
I've opened an issue about this in https://bugs.astron.com/view.php?id=111 So @eustas, the issue is that this implementation doesn't include magic bytes when it creates files and not streams? |
What is the state of this? Most (but not all! which is not looking promising) of the brotli files i looked at start with the byte |
The Linux
file
utility doesn't recognize brotli MIME type:I know, this is not related for the brotli itself but could you send a PR to file and libmagic so they start to recognize brotli mime type?
https://github.com/file/file/blob/master/src/compress.c
https://github.com/file/file/blob/master/magic/Magdir/archive
Also please confirm the correct brotli mime type #724
The text was updated successfully, but these errors were encountered: