Preview

13 - Compression

 1. Compression means to ______________ the size of a data file, whilst retaining most, or all, of the original information.
Note: Do watch the video if you can, but it is not specifically necessary to do so in order to answer the question. 

  increase

  reduce

  obliterate

  gentrify

 2. Commonly used file types that can be compressed include documents, music files, video and image files.

  TRUE

  FALSE

 3. Data streaming services may compress their files to ensure _____________________

  None of the above

  a lower bit per second transfer rate

  a higher bit per second transfer rate

  a huge decrease in the quality of their files

 4. What are main reasons for compressing files?

  All of the above

  Smaller attachments for email

  Less storage space required

  Faster downloads and uploads (coping with slow links when streaming)

 5. This may sound strange, but compression depends on ____________being present in the information .
Note: This fact (if you get the right 'blank' is true of text, images, music and video data!)

  text

  patterns

  pictures

  bits

 6. A pattern implies that certain parts of the data are identical but are just located at different places in the file

  FALSE

  TRUE

 7. Consider a text file like this. What statement is true?
www.testandtrack.io is wonderful
www.testandtrack.io is wonderful
www.testandtrack.io is wonderful
www.testandtrack.io is wonderful
www.testandtrack.io is wonderful
www.testandtrack.io is wonderful
www.testandtrack.io is wonderful
www.testandtrack.io is wonderful
www.testandtrack.io is wonderful
www.testandtrack.io is wonderful

  The information is massive, when you convert to binary and therefore compression is not possible

  This file is far too small to be compressed

  The information, rather than the data, is really just the first sentence (being repeated)

  This file could never be compressed

 8. A text compression algorithm could do the following with this text file:
www.testandtrack.io is wonderful
www.testandtrack.io is wonderful
www.testandtrack.io is wonderful
www.testandtrack.io is wonderful
www.testandtrack.io is wonderful
www.testandtrack.io is wonderful
www.testandtrack.io is wonderful
www.testandtrack.io is wonderful
www.testandtrack.io is wonderful
www.testandtrack.io is wonderful

  nothing - nothing could be done to compress this!

  create a file that only contains the first sentence and some instructions about how many times to repeat it

  create a file that contains ten times the volume of data in the original, and then save it as bits

  create a file that converts all of the text to audio - audio (waves) would mean a lower rate of storage

 9. The efficiency of compression is a simple formula:

  Compression ratio = compressed data size + 2 / original data size x 2

  Compression ratio = compressed data size / original data size x 2

  Compression ratio = compressed data size/2 x original data size/2

  Compression ratio = original data size / compressed data size

 10. Compression is also used by video and music streaming companies to _____________________

  Compresion is never used by video and music streaming services

  quadruple the bit rate per second and store it as bits, rather than bytes

  increase the bit rate per second

  reduce the bit rate per second. (compression ratio = original data rate / compressed data rate)

 11. The two types of compression are:

  mossy, mossless

  lossy, lossless

  tight, open

  mismatch, match

 12. Disregarding some of the original information if file size is an issue is usually referred to as ____________________

  lossless compression

  tight compression

  open compression

   lossy compression

 13. An example of lossy compression is when a music file…

  is too small to compress so is discarded altogether

  has sounds at frequencies that the human ear cannot hear (these can be discarded safely)

  has sounds at normal frequencies and it is important to retain every original frequency

  wishes to retain the highest of quality and every single original bit of data

 14. What statement is true about this lossy compression of images?
datarep_compression_q1.jpg

  None of the above

  They are vastly different and hugely matter

  It is slightly more blurry but not enough to matter in most circumstances

  Compression has reduced the quality by a significant degree and should not be used

 15. What is the benefit of compressing an image file for a use on a website?

  It takes up less storage space on your website

  It may offer the user speed in loading the page along with improved quality

  it would render exactly 15 times faster

  it may offer the user an alternative viewing experience which helps manage expectations

 16. A film could take up to an hour to download in uncompressed format whilst a compressed file could take just 12 minutes

  FALSE

  TRUE

 17. Lossless compression is when you are:

  reducing file size with a massive reduction in quality

  reduing a file's size in exactly the same was as lossy compression

  reducing file size with an increase in quality

  reducing a file's size with NO loss of quality

 18. Lossless compression is _________ effective than reducing file sizes than lossy compression but the trade off is no loss of quality.
Note: …but the trade off is no loss in the quality. Lossless compression is also done using pattern recognition. 

  FAR MORE

  MORE

  LESS

  None of the above

 19. Lossless data compression is used in many applications. For example, it is used in the ZIP file format and in the GNU tool gzip
datarep_compression_q2.jpg

  FALSE

  TRUE

 20. Fill in the blanks for the following excerpt on lossless compression.
Lossless compression is used in cases where it is important that the original and the decompressed data be identical, or where deviations from the original data would be unfavourable. Typical examples are executable _____________________

  programs, text documents, and source code

  None of the above

  videos, web images and repetitive text

  video cards, CPUs and operating system

 21. Two common lossless compression algorithms are:

  huffman coding and Run length encoding (RLE)

  Apple Compression and IBM HoHoMon

  All of the above

  minch compression and zilch compression

 22. Wider applications: Genetics compression algorithms (not to be confused with genetic algorithms) are the latest generation of lossless algorithms that compress data

  TRUE

  FALSE

 23. Fill in the blanks for RLE
RLE
===================================================
One of the simplest examples of compression is RLE. 
RLE is a basic form of data compression that converts 
consecutive identical values into a code consisting of
 the character and the number __________________________________.
The more similar values there are, the more values can be compressed. 
The sequence of data is stored as a single value and count.

  marking the length of the run.

  marking the binary file size

  marking the number of times the file has been compressed

  marking the number of bits contained in the file

 24. In the following picture we compress …
datarep_compression_q3.jpg

  random pixels by replacing each run with several pixels from it

  nothing at all

  consecutive pixels by only replacing each run with one pixel from it and a counter showing how many items it contains.

  random pixels by replacing each run by four pixels from it.

 25. Run-length encoding isn’t a very effective option when compressing texts, but for images …
datarep_compression_q4.jpg

  where long runs of the identical pixels happen to occur it is quite useful.

  None of the above

  where there are pixels it is even less useful

  where short runs of text bits happen to occur in sequence, it is useful