Saturday 5 September 2015

How Could Google's New Logo Be Only 305 Bytes, While Its Old Logo Is 14,000 Bytes?

The old logo uses a complicated serif font which can only be created using bezier curves. All together, it has 100 anchor points, resulting in a 6 KB (6,380 bytes) file. When compressed, the size comes down to 2 KB (2,145 bytes).A simplified version of the new logo, on the other hand, can be constructed almost entirely from circles and rectangles (with the exception of the lower-case g):The entire logo consists of:10 circles (2 each for the capital G and lower case g, 2 for each O, and 2 for the e)5 rectangles (2 for the capital G, 1 for the lower case l, 2 for the e)1 shape made with 7 anchor points (the descender on the lower-case g)While Google hasn't released the optimized 305 byte logo and it doesn't seem to be available online, I believe that they got the size down to 305 bytes as they claim.To verify this, I recreated the first letter (G) in the SVG format, resulting in a file that's 302 bytes uncompressed, and 195 bytes compressed. Here's the entire uncompressed graphic, consisting of two circles and two rectangles: This generates the graphic on the right:As another user pointed out, there is also a way to generate the new logo using strokes rather than fills. This is also something that wasn't possible to do with the old log, and can result in an even smaller file. The code for the entire logo (courtesy of Jaume Sanchez Elias) is 290 bytes: Using this approach, the entire logo can be drawn using 2 circles (for the 2 o's) and 4 paths (for the G, g, l, and e).About the author: Ilya Yakubovich, UI DesignerHow could Google's new logo be only 305 bytes, while its old logo is 14,000 bytes? originally appeared on Quora. You can follow Quora on Twitter, Facebook, and Google+.This answer has been lightly edited for grammar and clarity

No comments:

Post a Comment