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. 

  gentrify

  increase

  obliterate

  reduce

 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 _____________________

  a higher bit per second transfer rate

  a huge decrease in the quality of their files

  a lower bit per second transfer rate

  None of the above

 4. What are main reasons for compressing files?

  Less storage space required

  All of the above

  Smaller attachments for email

  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

  bits

  pictures

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

  TRUE

  FALSE

 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

  This file is far too small to be compressed

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

  This file could never be compressed

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

 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

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

  nothing - nothing could be done to compress this!

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

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

 9. The efficiency of compression is a simple formula:

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

  Compression ratio = original data size / compressed data size

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

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

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

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

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

  increase the bit rate per second

  Compresion is never used by video and music streaming services

 11. The two types of compression are:

  tight, open

  lossy, lossless

  mossy, mossless

  mismatch, match

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

  tight compression

  open compression

   lossy compression

  lossless compression

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

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

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

  is too small to compress so is discarded altogether

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

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

  They are vastly different and hugely matter

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

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

  None of the above

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

  it would render exactly 15 times faster

  It takes up less storage space on your website

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

  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

  reducing a file's size with NO loss of quality

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

  reducing file size with an increase in 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. 

  None of the above

  LESS

  MORE

  FAR MORE

 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

  TRUE

  FALSE

 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 _____________________

  videos, web images and repetitive text

  programs, text documents, and source code

  None of the above

  video cards, CPUs and operating system

 21. Two common lossless compression algorithms are:

  minch compression and zilch compression

  All of the above

  huffman coding and Run length encoding (RLE)

  Apple Compression and IBM HoHoMon

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

  FALSE

  TRUE

 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 bits contained in the file

  marking the number of times the file has been compressed

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

  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.

  nothing at all

  random pixels by replacing each run with several pixels from it

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

  None of the above

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

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

  where there are pixels it is even less useful