News for hackers. Stuff that matters.
Re:Fast base64 encoding and decoding by bzbarsky on Wednesday January 17, 2018 @11:54PM (#16174796)
Why should parsing CSS block on decompressing base64, unless the CSS itself is a base64-encoded data: URI?

If you're talking about data: background images in CSS, then all the CSS parser has to do is find the end of the url(). It doesn't have to do any base64 decoding or anything like that until the rule actually matches.

Re:Fast base64 encoding and decoding by Veedrac on Thursday January 18, 2018 @07:06AM (#16176475)
You have to gz-decompress it, which is a harder job, and the only reason you're doing that (at least for images) is to undo the inefficiency you just added.
Re:Fast base64 encoding and decoding by bzbarsky on Thursday January 18, 2018 @12:08PM (#16178758)
Ah, gz-decompress the stylesheet itself, ok.

For what it's worth, in my profiles of pageloads in at least Firefox I haven't seen gz-decompression of stylesheets show up in any noticeable way, but I can believe that it could be a problem if you have a lot of data: images in the sheet...