CSSMin: Do not base64-encode non-binary files when embedding
authorBartosz Dziewoński <matma.rex@gmail.com>
Wed, 17 Sep 2014 21:14:46 +0000 (23:14 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Tue, 30 Sep 2014 21:13:42 +0000 (23:13 +0200)
Do not base64-encode non-binary files (containing only whitespace and
printable ASCII characters, which matches sane SVG files).

For SVG files the percent-encoded URIs are actually slightly longer
than the base64-encoded ones (~10%), but compress a lot better
resulting on 15-20% less data to transfer after gzip compression.

(The effect is best seen on the 'oojs-ui' module, which consists
mostly of SVG icons – especially after commenting out everything other
than 'oojs-ui.svg.css'.)

I tried this for binary files too, just in case; but as expected, they
suffer from a noticeable size increase even with compression (~15%).

Bug: 67341
Change-Id: Iddaf863b6be98570a2bb8e606f13946a96345f65


No differences found