Prefixes and Compression (copy)

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/9

encourage image

There's no tags or description

Looks like no tags are added yet.

10 Terms

1
New cards

What are the base 10 prefixes? (4)

  • Kilo

  • Mega

  • Giga

  • Tera


2
New cards

What are the base 2 prefixes? (4)

  • Kibi

  • Mibi

  • Gibi

  • Tibi


3
New cards

what are the different types of compression? (2)

  • lossy compression - techniques that always result in a loss of data, i.e. some data is permanently removed from the file

  • lossless compression - techniques where no data is lost in the process


4
New cards

where is lossy compression used (3)? where is lossless compression used? (3)

  • lossy compression - audio files, video files, photographs

  • lossless compression - images, short animations, compressing one / more files together


5
New cards

what are some common lossy compression file formats (4)? what are some common lossless compression file formats (3)?

  • lossy compression - MP3 (audio files, e.g. downloading music), JPEG (photographs), MPEG-1 (small, low-resolution video files), MPEG-2 (full-screen, high-resolution video files)

  • lossless compression - PNG (highest-quality images), GIF (short animations), ZIP (1 / more files compressed together)


6
New cards

advantages of lossy compression (3) and lossless compression (3)

  • lossy:

    • significantly reduces file size - easier to store and transfer

    • lossy-compressed files take up less storage space

    • faster transfer means quicker access to files, especially for larger ones

  • lossless:

    • preserves original quality - no data lost in compression

    • useful for text and program files when preserving original data is crucial

    • reduces file size - saves storage space


7
New cards

drawbacks of lossy compression (2) and lossless compression (2)

  • lossy:

    • always removes some data - can lead to reduction in file quality; this is noticeable in audio and video files

    • is irreversible - permanently reduced quality

  • lossless:

    • compresses files less than lossy compression - file may still be quite large after lossless compression

    • can be more complex and require more processing power to compress and de-compress compared to lossy compression


8
New cards

What are some techniques of lossless compression? (2)

  • RLE - Run-Length Encoding

  • Huffman Coding


9
New cards

Perform RLE on this: rrrrryyyiiii

(5,r) (3,y) (4, i)

10
New cards

In a Huffman tree, what are the steps to compress a string? (4)

  • order characters in the order of their frequency at the bottom of the tree, i.e. how many times they appear in the string - this includes spaces and punctuation! write their frequency next to each character in brackets

  • try to combine different characters to make the lowest frequency, e.g. if i have I (9) and y (7) and ! (5), I will combine y and ! to make y! (12), because 12 is the lowest frequency that can be made.

  • keep going until you get to one big string that basically does not look any sense, at the top of the tree

  • label each right branch 1, and each left branch 0. By using this, you can now generate a binary code for each character in your Huffman tree, by going from the big weird string to an individual character


<ul><li><p>order characters in the order of their frequency at the bottom of the tree, i.e. how many times they appear in the string - this includes spaces and punctuation! write their frequency next to each character in brackets</p></li><li><p>try to combine different characters to make the lowest frequency, e.g. if i have I (9) and y (7) and ! (5), I will combine y and ! to make y! (12), because 12 is the lowest frequency that can be made.</p></li><li><p>keep going until you get to one big string that basically does not look any sense, at the top of the tree</p></li><li><p>label each right branch 1, and each left branch 0. By using this, you can now generate a binary code for each character in your Huffman tree, by going from the big weird string to an individual character</p></li></ul><p></p>