Movatterモバイル変換


[0]ホーム

URL:


Encyclopedia Britannica
Encyclopedia Britannica
SUBSCRIBE
SUBSCRIBE
SUBSCRIBE
History & SocietyScience & TechBiographiesAnimals & NatureGeography & TravelArts & Culture
Ask the Chatbot Games & Quizzes History & Society Science & Tech Biographies Animals & Nature Geography & Travel Arts & Culture ProCon Money Videos
data compression
Britannica AI Icon
verifiedCite
While every effort has been made to follow citation style rules, there may be some discrepancies.Please refer to the appropriate style manual or other sources if you have any questions.
Select Citation Style
Feedback
Corrections? Updates? Omissions? Let us know if you have suggestions to improve this article (requires login).
Thank you for your feedback

Our editors will review what you’ve submitted and determine whether to revise the article.

External Websites

data compression

computing
Also known as:compaction, compression, data compaction

data compression, the process of reducing the amount ofdata needed for the storage or transmission of a given piece of information, typically by the use of encoding techniques. Compression predates digitaltechnology, having been used inMorse Code, which assigned the shortest codes to the most common characters, and in telephony, which cuts off high frequencies in voice transmission. Today, when an uncompressed digital image may require 20 megabytes, data compression is important in storing information digitally on computer disks and in transmitting it over communications networks.

Information is digitally encoded as a pattern of 0s and 1s, orbits (binary digits). A four-letter alphabet (a,e,r,t) would require two bits per character if all characters were equally probable. All the letters in the sentence “A rat ate a tart at a tea,” could thus beencoded with 2 × 18 = 36 bits. Becausea is most frequent in this text, witht the second most common, assigning a variable-length binary code—a: 0,t: 10,r: 110,e: 111—would result in a compressed message of only 32 bits. This encoding has the important property that nocode is a prefix of any other. That is, no extra bits are required to separate letter codes: 010111 decodes unambiguously asate.

Data compression may belossless (exact) or lossy (inexact). Lossless compression can be reversed to yield the original data, while lossy compression loses detail or introduces small errors upon reversal. Lossless compression is necessary for text, where every character is important, whilelossy compression may be acceptable for images or voice (thelimitation of the frequency spectrum in telephony being an example of lossy compression). The three most common compression programs for general data are Zip (on computers using Windows operating system), StuffIt (on Apple computers), and gzip (on computers running UNIX); all use lossless compression. A common format for compressing static images, especially for display over theInternet, isGIF (graphics interchange format), which is also lossless except that its images are limited to 256 colours. A greater range of colours can be used with theJPEG (joint photographic experts group) formatting standard, which uses both lossless and lossy techniques, as do various standards ofMPEG (moving picture expert group) for videos.

computer chip. computer. Hand holding computer chip. Central processing unit (CPU). history and society, science and technology, microchip, microprocessor motherboard computer Circuit Board
Britannica Quiz
Computers and Technology Quiz

For compression programs to work, they must have a model of the data that describes the distribution of characters, words, or other elements, such as the frequency with which individual characters occur in English. Fixed models such as the simple example of the four-character alphabet, above, may not characterize a single text very well, particularly if the text contains tabular data or uses a specialized vocabulary. In these cases, adaptive models, derived from the text itself, may be superior. Adaptive models estimate the distribution of characters or words based on what they have processed so far. An important property of adaptive modeling is that if the compression and decompression programs use precisely the same rules for forming the model and the same table of codes that they assign to its elements, then the model itself need not be sent to the decompression program. For example, if the compressing program gives the next available code tothe when it is seen for the third time, decompression will follow the same rule and expect that code forthe after its second occurrence.

Coding may work with individual symbols or with words.Huffman codes use a static model and construct codes like that illustrated earlier in the four-letter alphabet. Arithmetic coding encodes strings of symbols as ranges of real numbers and achieves more nearly optimal codes. It is slower than Huffman coding but is suitable for adaptive models.Run-length encoding (RLE) is good for repetitive data, replacing it by a count and one copy of a repeated item. Adaptive dictionary methods build a table of strings and then replace occurrences of them by shorter codes. TheLempel-Ziv algorithm, invented by Israeli computer scientists Abraham Lempel and Jacob Ziv, uses the text itself as the dictionary, replacing later occurrences of a string by numbers indicating where it occurred before and its length. Zip and gzip use variations of the Lempel-Zivalgorithm.

Lossy compression extends these techniques by removing detail. In particular, digital images are composed ofpixels that represent gray-scale or colour information. When apixel differs only slightly from its neighbours, its value may be replaced by theirs, after which the “smoothed” image can be compressed using RLE. While smoothing out a large section of an image would be glaringly evident, the change is far less noticeable when spread over small scattered sections. The most common method uses thediscrete cosine transform, a mathematical formula related to theFourier transform, which breaks the image into separate parts of differing levels of importance for image quality. This technique, as well asfractal techniques, can achieve excellent compression ratios. While the performance of lossless compression is measured by its degree of compression, lossy compression is also evaluated on the basis of the error it introduces. There are mathematical methods for calculating error, but the measure of error also depends on how the data are to be used: discarding high-frequency tones produces little loss for spoken recordings, for example, but an unacceptabledegradation for music.

Video images may be compressed by storing only the slight differences between successive frames. MPEG-1 is common in compressing video forCD-ROMs; it is also the basis for theMP3 format used to compress music. MPEG-2 is a higher “broadcast” quality format used forDVDs (seecompact disc: DVD) and some television networking devices. MPEG-4 is designed for “low bandwidth” applications and is common for broadcasting video over theWorld Wide Web (WWW). (MPEG-3 was subsumed into MPEG-2.)Video compression can achieve compression ratios approaching 20-to-1 with minimal distortion.

50% Off Black Friday Savings!
All Britannica annual subscriptions are now 50% off!

There is a trade-off between the time and memory that compressionalgorithms require and the compression that they achieve. English text can generally be compressed to one-half or one-third of its original size. Images can often be compressed by factors of 10 to 20 or more. Despite the growth of computer storage capacity and network speeds, data compression remains an essential tool for storing and transmitting ever-larger collections of data.See alsoinformation theory: Data compression;telecommunication: Source encoding.

David Hemmendinger

[8]ページ先頭

©2009-2025 Movatter.jp