Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 8

1.1.5.

Compression
Techniques
Students should be able to show understanding of how digital data
can be compressed, using either ‘lossless’ (including run-length
encoding – RLE) or ‘lossy’ techniques
Compression techniques and packaging of multimedia content

For another time the issue of file size will be discussed, this time in the context of
starting with a file that needs to have its size reduced to reduce memory storage
requirements and improve transmission rates.

There are two categories of compression. The first is lossless compression where
the file size is reduced but no information is lost and when necessary the process
can be reversed to recreate the original file. The second is lossy compression
where the file size is reduced with some loss of information and the original file
can never be recovered. In many applications a combination of lossless and lossy
methods may be used.
Types of compression:

Lossless compression: coding techniques that allow subsequent


decoding to recreate exactly the original file

Lossy compression: coding techniques that cause some information


to be lost so that the exact original file cannot be recovered in
subsequent decoding
This is a slide title

If a file contains text then compression must be


lossless because it is not sensible to allow any
loss of information . One possible compression
method would be Huffman coding. The
procedure used to carry out the compression is
quite detailed but the principle is
straightforward. Instead of having each
character coded in one byte an analysis is
carried out to find the most often used
characters. These are then given shorter codes.
The original stream of bytes becomes a bit
stream. A possible set of codes if a text
contained only eight different letters is shown
in Table 1.04.
The important point to note here is the prefix property. None of the codes begins
with the sequence of bits representing a shorter code. Thus there can be no
ambiguity when the transmitted compressed file has to be converted back to the
original text.
A different lossless compression technique is run-length encoding. This can be
particularly effective for compressing a bitmap file. The compression converts
sequences of the same bit pattern into a code that defines the bit pattern and the
number of times it is repeated .
Lossy compression can be used in circumstances where a sound file or an image
file can have some of the detailed coding removed or modified when it is likely
that the human ear or eye will hardly notice any difference. One example would
be to reduce the colour depth for the coding of a bitmap.
Graphic files can be stored in a number of formats. For example, JPEG, GIF, PNG
and TI FF are just a few of the possibilities. What compression techniques, if any, do
these use?
If the image coding for a video is to be compressed, one approach is to tackle the
spatial redundancy in individual frames using techniques applicable to an image file.
However, this is unlikely to be an efficient technique because, in general, one frame
is very similar to the preceding one. It will be more effective to tackle this temporal
redundancy by changing the frame by frame coding to one which mainly records
differences between adjacent frames.
A video contains images and sound but these do not go to the same part of any
receiving and displaying system. Clearly the audio and visual parts of a video must
be handled independently but in a way that guarantees synchronisation. The solution
to this is to package the audio and visual components in what is known as a
multimedia container format. This concept is currently being developed by several
different organisations or companies. The use is not restricted to one video file and
one sound file. Rather, one multimedia container file will have many audio and
video streams plus other streams, perhaps for subtitles or chapter headings.
Thanks!

You might also like