Compressing to the max for Web arts

February 28, 2000|By Mike Himowitz

Not long ago, an outfit promoting a high-speed Internet data transfer service sent me a white, shrink-wrapped "brick" about the size of a carry-around Kleenex package. When I opened the plastic, the brick unfolded into an extra large T-shirt -- wrinkled, but otherwise intact.

A note inside told me the shirt had been "compressed" under 50 tons of pressure, which intrigued me, so I did a little research in the bureau drawer where I keep my T-shirts. I found that by using my standard laundry compression method, which consists of squashing everything down, I could fit 15 T-shirts in the drawer. A quick mathematical calculation told me the same drawer would hold 40 T-bricks, for a T-shirt compression ratio of better than 2.5 to 1.

Of course, I don't have 40 T-shirts, and none of us have heavy-duty presses that can squash our clothing into bricks.

But the company made its point: We have machines that can compress stuff into small spaces. They're called personal computers, and their ability to compress data -- in the form of photos, music and motion pictures -- is fueling the Internet multimedia boom.

Compressing information has been important to computer scientists since the dawn of the digital age. That's because, until recently, the media we use to store digital zeros and ones -- memory chips and disk drives -- have been expensive.

When I bought my first computer in 1983, a floppy disk drive cost $400, the equivalent of $700 today. For that I got a gadget that stored about 150 kilobytes of information on disks that cost five bucks apiece. It also was expensive to transmit data over long-distance phone lines when modems could handle only 120 characters per second.

Programmers and hardware designers would do anything they could to save a bytes of data. One quick-and-dirty method was abbreviating the year with two digits, which brought on something called the Y2K problem. But scientists also developed sound, sophisticated, mathematical methods for squeezing information into a fraction of the space it normally would occupy.

Computer memory, hard disk storage and communications bandwidth cost a fraction of what they did 20 years ago. Still, compression technology is even more critical because we're dealing with quantities of data that are astronomical by 1980 standards.

You see the results of this research every day. If you've ever downloaded a ZIP file over the Internet, you've received a packaged of squashed information. Likewise, every image you've seen on a Web page was compressed by its creator and decompressed by your Web browser.

The digital MP3 music files that college students exchange over the Internet are the result of efforts to compress the sounds we hear. Without compression, the Web would be a lot duller -- and certainly not the economic powerhouse it has become.

How does compression work? Let's consider digital photography, because that's the most common application. When you "digitize" a picture, you're breaking it up into dots, or pixels, which can be displayed on your screen or printed on paper. You can create a digital photo from scratch with a digital camera or use a scanner to digitize a print or negative.

Let's say you're interested in printing a photo. For good reproduction, you'll need quite a few dots: The generally accepted minimum dimensions are 1,024 by 768, which is just under 800,000 dots.

But that's just the beginning. Theoretically, the human eye can distinguish about 16 million discrete colors. So each dot has to have color information attached.

The smart guys have figured out that it takes 24 bits (ones and zeros) to record a single dot's color data, which adds up to about 2.4 megabytes of information for each shot. A that rate, a single "roll" of 24 digital images would eat up 58 megabytes of disk space, and transferring a single photo via e-mail over a dial-up connection would take 10 to 15 minutes.

Enter the Joint Photographic Experts Group, a committee of scientists affiliated with the International Standards Organization. It developed a method for compressing digital photos based on the fact that our eyes are much more sensitive to small changes in brightness than to small changes in color.

By mathematically "throwing out" bits of information that our eyes don't use, the scientists were able to reduce the quantity of data in digital photos by 95 percent or more. So that 2.8-megabyte portrait now occupies only 140,000 bytes -- it doesn't use much disk space and requires only seconds to move over the Web.

You see these files all the time. They're called JPEGs, and they usually have the extension .jpg. Your Web browser automatically decodes, expands and displays them, and virtually all photo editing programs support them.

Baltimore Sun Articles
Please note the green-lined linked article text has been applied commercially without any involvement from our newsroom editors, reporters or any other editorial staff.