This preview shows page 1. Sign up to view the full content.
Unformatted text preview: c compression techniques are described below. An actual compression
technique for multimedia object is often a combination of one or more of these
basic compression techniques.
The following two are the commonly used lossless compression techniques:
1. Run-length coding. In this method, repeated symbols in a string are replaced
with the symbol and the number of instances it is repeated.
"aaaabbcccccaaaaaababbbb" is expressed as "a4b2c5a6blalb4".
2. Variable-length coding. In general, coding schemes for a given character set
use a fixed number of bits per character. For example, BCD, EBCDIC and ASCII
coding schemes use a fixed number of bits per character. If it is known (through
statistical studies) that the frequency of occurrence of different characters in a
character set is different (for example we all agree that the character Z is not so
frequently used as the character A in the character set of English alphabets), then a
coding scheme that employs a variable number of bits per character may be used
to obtain tighter packaging of data. A variable-length coding scheme is based on
this concept. In such a coding scheme, fewer bits are used to represent the more
frequently occurring characters than the less frequently occurring ones. Obviously,
the most frequently occurring character would be represented with only one bit.
Huffman coding is an example of this method. It is briefly described below with
To make the example simple and easy to understand, let us assume that our
character set consists of only six characters: A, B, C, D, E, and F. A conventional
coding scheme that uses a fixed number of bits per character would require three
bits per character (because 22 < 6 < 23). Now suppose the relative frequency of
occurrence of the characters in this character set is as shown in Figure 19.9. The
figure also displays a Huffman coding of these six characters, which minimizes
the total number of bits for ch...
View Full Document
- Spring '14