1.3.1 - Databases Flashcards
What does compression do?
Compression makes file sizes smaller, meaning more files can be stored in a fixed storage amount and files will be quicker to transfer, upload and download.
What is a compression technique?
It is an algorithm to reduce the number of binary digits in a file.
What is a compression ratio?
It is a number which gives an indication of the success of a compression method in reducing file size, calculated by dividing the compressed file size by the original file size.
What does compression not change?
The fundamental properties of the file, e.g resolution or length of music track.
What is lossy compression?
It is a term to describe compression techniques resulting in a loss of data - data is permanently removed from the file.
What happens when a lossy compressed file is decompressed?
The data that was removed is re-created from the data in the file.
It almost certainly won’t be the same as the original data, instead an approximation.
Give 2 examples of lossy formats.
MP3 and JPEG
Which types of data are not suitable for lossy compression?
Files containing words or numbers, as their contents need to be exactly the same and not approximated.
What is lossless compression?
Lossless compression refers to techniques where no data is lost in compression. When the file is decompressed, the contents are identical to the original file.
When is lossless compression appropriate?
When data cannot be approximated - e.g text files.
What is dictionary-based compression?
It is a lossless technique relying on finding patterns in data. However, it doesn’t look for repeated runs of characters, as the repetitions don’t need to be adjacent. Instead, a shorter code is substituted for patterns which repeat lots.
What is run length encoding?
It is a lossless technique relying on finding “runs” of repeated binary patterns and replacing them with a single instance of the pattern and a number specifying how many times the pattern is repeated.
When is RLE most useful?
RLE will only achieve significant reductions in file size if there are long runs of data.
In the extreme case of there being no repeated patterns, the file size could be double that of the original.