Posted:
By Colt McAnlis, Google Developer Advocate

The next five billion humans who come online will be doing so from parts of the world where connectivity is costly and slow. With the average website approaching 2 megabytes in size and the average Android game approaching 125 megabytes, users in these markets will have to make a tough choice between content and cost. Compression algorithms, which address this issue, will become critically important over the next decade.


Most developers are content to let compression be someone else’s problem. But the truth is that these algorithms sit in the intersection of optimization, information theory, and pragmatism. These videos will take us through the history of information theory, explain why compression matters, and show how different algorithm families approach this challenge.

Compressor Head, Episode 1 (Variable Length Codes)

Understanding compression algorithms means understanding how humans view and use data. Colt explores the creation of Information Theory, and how it’s spawned the concept of variable length codes, which since the early 1950s have been at the heart of data compression algorithms.

Compressor Head, Episode 2 (The LZ Compression Family)

In the world of compression, one algorithm family reigns supreme. Born in the late 1970s, the Lempel-Ziv algorithms have become the most dominant dictionary encoding schemes in compression. This episode explains why these algorithms are so dominant.

Compressor Head, Episode 3 (Markov Chain Compression)

At the cutting edge of compression algorithms sits the lonely kingdom of Markov Chains. These algorithms adopt an Artificial Intelligence approach to compression by allowing the encoder and decoder to ‘predict’ what data is coming next. In this episode you’ll learn how these magical algorithms compress data, and why some think that they are the future of compression.

While the world of compression is focused on making things smaller, we’re going big with a set of three YouTube videos introducing modern developers to the world of compression algorithms. And they’re all available now, exclusively on our Google Developers YouTube channel at http://g.co/compressorhead.

Colt McAnlis is a games developer advocate who believes every bit counts and that performance matters. He is a Udacity course instructor on HTML5 games and a Book Author. When he's not working with developers, Colt’s been known to compress games, buildings and mountains with his bare hands.

Posted by Louis Gray, Googler

Posted:
Author Photo By Mark Scott, Product Manager, Chrome

Cross-posted from the Chromium Blog

Event pages keep apps and extensions efficient by allowing them to respond to a variety of events such as timers or navigation to a particular site, without having to remain running persistently. But what if you need to respond to something that occurs outside of Chrome, such as a news alert, a message sent to a user or a stock hitting a price threshold? Until now, you had to do this by repeatedly polling a server. This process consumed bandwidth and reduced the battery life of your users’ machines. For a more efficient solution, starting today you can use Google Cloud Messaging for Chrome (GCM) - across all channels of Chrome.

GCM will be familiar to developers who have used Google Cloud Messaging for Android. To send a message, all you need to do is:
  1. Request a token (channel ID) via chrome.pushMessaging.getChannelId()
  2. Pass the returned token to your server. 
  3. Whenever you need to send a message to your app or extension, post the message along with the token to the GCM server-side API. 
Your message is then delivered in near real time to Chrome. This makes your event page wake up (if it’s not already running), and the message is delivered to your chrome.pushMessaging.onMessage listener.



To use GCM, your users must be signed into Chrome, as the service relies on an efficient push channel that’s only established for signed-in users. Messages are automatically delivered to all the devices where the user has signed in and installed your app/extension.

To add GCM to your app/extension, take a look at the overview of the service or start with some of the sample apps—and start pushing!


Mark Scott is a Product Manager on the Google Chrome team. He works with a team in Kirkland on features that make Chrome a great platform for building apps.

Posted by Scott Knaster, Editor