Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
29 views

Data Storage and File Compression

This document discusses data storage, file compression, and their types. It begins by defining basic units of data storage like bits and bytes. It then describes two main types of file compression: 1) Lossless compression, which allows the original file to be reconstructed exactly. An example technique is run-length encoding (RLE), which reduces file size by encoding repeated data. 2) Lossy compression, which discards some data and cannot reconstruct the original file. Common lossy formats are MP3, MP4, and JPEG, which reduce things like audio quality or image resolution. While lower quality, lossy compression provides much greater file size reductions than lossless. The document analyzes how compression

Uploaded by

delishakp09
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Data Storage and File Compression

This document discusses data storage, file compression, and their types. It begins by defining basic units of data storage like bits and bytes. It then describes two main types of file compression: 1) Lossless compression, which allows the original file to be reconstructed exactly. An example technique is run-length encoding (RLE), which reduces file size by encoding repeated data. 2) Lossy compression, which discards some data and cannot reconstruct the original file. Common lossy formats are MP3, MP4, and JPEG, which reduce things like audio quality or image resolution. While lower quality, lossy compression provides much greater file size reductions than lossless. The document analyzes how compression

Uploaded by

delishakp09
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Data Storage and File

compression
KS4 – Data representations
Topic: Data Storage and File compression

Lesson Objective:
To understand data compression and its types.

Self assessment
Success Criteria:
AT I can describe data compression and its types.
ABOVE I can compare the lossless and lossy compression
method.
ABOVE + I can analyze the impact of data compression on
file size.
Retrieval Practice
What are the benefits of using large sampling Define sampling resolution and color
rate? depth.
Measurement of data storage
The above system of numbering now only refers to some
A bit is the basic unit of all computing memory storage storage devices but is
terms and is either 1 or 0. technically inaccurate. It is based on the SI (base 10)
The word comes from binary digit. The byte is the smallest system of units where
unit of memory in a 1 kilo is equal to 1000.
computer. 1 byte is 8 bits. A 4-bit number is called a nibble – A 1 TB hard disk drive would allow the storage of 1 × 1012
half a byte. bytes according to this
1 byte of memory wouldn’t allow you to store very much system.
information so memory However, since memory size is actually measured in terms
size is measured in the multiples shown in Table 1.4: of powers of 2, another
system has been adopted by the IEC (International
Electrotechnical Commission)
that is based on the binary system (Table 1.5):
Calculation of file size
The file size of an image is The size of a mono sound file is
calculated as : calculated as:
Data Compression
The sound and image files can be very large. It is therefore necessary to reduce
(or compress) the size of a file for the following reasons:

» to save storage space on devices such as the hard disk drive/solid state drive.

» to reduce the time taken to stream a music or video file.

» to reduce the time taken to upload, download or transfer a file across a network »
the download/upload process uses up network bandwidth – this is the maximum
rate of transfer of data across a network, measured in bits per second. This occurs
whenever a file is downloaded, for example, from a server. Compressed files
contain fewer bits of data than uncompressed files and therefore use less
bandwidth, which results in a faster data transfer rate.

» reduced file size also reduces costs. For example, when using cloud storage, the
cost is based on the size of the files stored.
Also, an internet service provider (ISP) may charge a user based on the amount
of data downloaded
Lossy file compression
With this technique, the file compression algorithm eliminates unnecessary data
from the file. This means the original file cannot be reconstructed once it has
been compressed.
Lossy file compression results in some loss of detail when compared to the original file. The algorithms
used in the lossy technique must decide which parts of the file need to be retained and which parts can be
discarded.

For example, when applying a lossy file compression algorithm to:

» an image, it may reduce the resolution and/or the bit/color depth


» a sound file, it may reduce the sampling rate and/or the resolution.

Lossy files are smaller than lossless files which is of great benefit when considering storage and data
transfer rate requirements.
Common lossy file compression algorithms are:

» MPEG-3 (MP3) and MPEG-4 (MP4)


» JPEG
MPEG-3 (MP3) and MPEG-4 (MP4) MP3 files are used for playing music on computers
or cell phones. This compression technology will reduce the size of a normal music file by
about 90%. While MP3 music files can never match the sound quality found on a DVD or
CD, the quality is satisfactory for most general purposes.

But how can the original music file be reduced by 90% while still retaining most of the
music quality?

Essentially the algorithm removes sounds that the human ear can’t hear properly. For
example:

» removal of sounds outside the human ear range


» if two sounds are played at the same time, only the louder one can be heard by the ear,
so the softer sound is eliminated. This is called perceptual music shaping
JPEG When a camera takes a photograph, it produces a raw bitmap
file which can be very large in size. These files are temporary in
nature. JPEG is a lossy file compression algorithm used for bitmap
images. As with MP3, once the image is subjected to the JPEG MP4 files are slightly different to MP3
compression algorithm, a new file is formed, and the original file can files. This format allows the storage of
no longer be constructed. multimedia files rather than just sound –
music, videos, photos and animation
The JPEG file reduction process is based on two key concepts: can all be stored in the MP4 format. As
with MP3, this is a lossy file
» human eyes don’t detect differences in colour shades quite as well compression format, but it still retains an
as they detect differences in image brightness (the eye is less acceptable quality of sound and video.
sensitive to colour variations than it is to variations in brightness) Movies, for example, could be streamed
over the internet using the MP4 format
» by separating pixel colour from brightness, images can be split into without losing any real discernible
8 × 8 pixel blocks, for example, which then allows certain quality.
‘information’ to be discarded from the image without causing any real
noticeable deterioration in quality
Lossless file compression
With this technique, all the data from the original
Run-length encoding (RLE) can be used for lossless
uncompressed file can be reconstructed. This is
compression of a number of different file formats:
particularly important for files where any loss of
data would be disastrous (e.g. when transferring a
» it is a form of lossless/reversible file compression
large and complex spreadsheet or when
» it reduces the size of a string of adjacent, identical
downloading a large computer application).
data (e.g. repeated colours in an image)
» a repeating string is encoded into two values:
Lossless file compression is designed so that
– the first value represents the number of identical
none of the original detail from the file is lost
data items (e.g. characters) in the run
– the second value represents the code of the data
item (such as ASCII code if it is a keyboard
character)
» RLE is only effective where there is a long run of
repeated units/bits
Run Length Encoding

You might also like