compression Flashcards
what is data compression
making file sizes smaller:
less storage space taken up
faster streaming and downloading
web pages load quicker
same content with smaller file size
what is lossy compression
pros and cons
lossy removes data permanently from the file which reduces number of bits needed
pros
greatly reduces file size
less bandwidth
commonly used
cons
loses data and file cannot go back to original
can’t be used on text
worse quality
e.g MP3. ACC. JPEG
lossless compression
pros and cons
lossless makes file sizes smaller less smaller by temporarily removing data and then is restored to original state when opened
pros
no reduction in quality
turn back to original
used on text and software files
cons
only slight reduction in file size less
e,g FLAC . ZIP. PNG
explain and understand huffman coding
lossless compression technique
1. gives each data value à unique binary code
2. shorter binary codes appear more frequently
3. replace every character in string with huffman code
1 is on the right
0 is on the left
RLE run length encoding
lossless compression
looks for repeating data called à run
stores number of times data repeats and only one copy of that data