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
Using zopfli to compress squeezes out 3 more bytes #12
Comments
Huh. I tried using Zopfli earlier, and it only got me another byte. I'll have to replicate this and see if it works on my end. Thanks for bringing this up, it is very hard to drop bytes at this point! |
Apparently zopfli is non-deterministic: google/zopfli#20
On my machine there are still some re-ordering of rules that will squeeze another byte or two out. I'm now a little tempted to create a brute-force CSS reordering gzip minifier thing to automate this step. :-) |
I actually wrote one of those already, that's how I got it down so small |
I was playing with Brotli, and got it down to 311 bytes. I was able to get it down to 395 bytes with zopfli, and reordering. I'll probably switch to the zopfli number, and reorder for zopfli. Brotli is gaining support though, so that is also something to keep in mind. Here is my bruteforce solution (written in nim)
|
I actually just wrote (with the help of some colleagues) a JS helper to iterate through every possible combination of selector and rule/declaration order, then zopfl()ied the resulting string (I'm ignoring specificity and the |
Yeah, I noticed that when trying to write my own as well. I went with a shallow approach that would at least finish. I'll have to see if reordering the media query might help, my code ignores that as well. Thanks for exploring more into this! |
I swear I'll do this, just haven't had the time recently. |
Finally got around to getting this in, thanks! |
The following outputs a file that is 395 bytes:
The text was updated successfully, but these errors were encountered: