3.3: data storage and compressions Flashcards
kilobyte
1000 kB
megabyte
1000² MB
gigabyte
1000³ GB
terabyte
1000⁴ TB
kibibyte
1024 KiB
mebibyte
1024² MiB
gigibyte
1024³ GiB
tebibyte
1024⁴ TiB
compression methods
lossless
lossy
advantages of data compression
makes storage more efficient
allows you to upload and download files faster
lossless compression
do not lose any data
data can be reversed to what it was before
use shorthand to store data
examples of lossless compression
ZIP file
RLE (run length encoding)
ZIP file
if you add files to a ZIP they take up less space but are exactly the same when you unzip them
RLE
RLE encodes data items and how long it runs
example of RLE
55555511111333
turns into:
(6 5) (5 1) (7 3)
lossy compression
removes data that us unnecesary
data cannot be restored to what it was before as data is lost
use of lossy compression
multimedia
for audio files by removing sounds outside the range that humans can hear
example of lossy compression
MP3
this means less space required and faster streaming
JPEG
decreases size of image