2.3.4 Data Compression Flashcards
Data compression
Process used to reduce the storage requirements of a file.
Process used algorithms to look for repeating patterns that can be stored with less data.
Reasons to compress files
- reduce amount of storage space needed for storage devices
- reduce bandwidth needed to upload/ download file.
Types of compressions
LOSSY
LOSSLESS
Lossy compression
Some original data will be lost during compression
Notice difference in quality.
Lossless
Algorithms are used but little/ no data lost.
Impossible to notice difference in quality.
Zipping
Procedure for compressing data files
Uses an algorithm called LZW
LZW - In zipping
- looks for recurring patterns with data.
- can be placed with a single character.
- less bits are used to represent original data.
- when zipped file decompressed by zipping software the reverse procedure happens.
WAV waveform audio file format
- portable- played by most audio software.
- uncompressed but can be used to store compressed sounds.
- used by audio profession to record sounds.
Txt
- only holds letters and numbers.
- no formatting or images.
- no compression as already small file.
- May contain a special symbol to signify the end of file.
- sometimes used to send basic data between larger applications.
Analogue and digital sounds.
- humans hear in analogue- continuously varying signal.
- computers digital- need to convert sound to digital data.
Converting sound to digital data
- audio captured via input device ie mic.
- sound travels down wire as an electrical signal.
- computer changes signal to binary data ADC
- software saves the data as sound files with the quality being determined by sample rate and sample resolution.
BMP
- map of all the bits
- details of all the pixels that make up and image are stored.
- each pixel has the digital representation of its individual colour stored separately.
- colours that fade into other colours can be accurately represented.
JPEG
- looks for sequences of pixels that repeat and only store data once.
- used on webpages
- supports 16million colours.
- LOSSY compression but amount of detail lost can be varied by user.
- not support transparency/ animation.
GIF
- restricted to 8 bit colour depth 256 colours.
- LOSSLESS compression when used on simple images with blocks of colour.
- LOSSY compression for real or lifelike images.
- small file sizes
- can contain transparency pixels and supports animation.
MPEG
- include MP3 audio and MPEG4 video
- discards sounds that typical human air does not notice for music.
- for video 24/25 FPS- full frames only stored occasionally- only store data different to previous frame.
- heavily compresses the source by only storing data about non changing pixels once.
- designed for online streaming.
- LOSSY compression but can maintain v high image quality.
- can contain subtitles
- default format used by mobile phones and digital cameras.