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. 

  obliterate

  gentrify

  increase

  reduce

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

  FALSE

  TRUE

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

  None of the above

  a higher bit per second transfer rate

  a lower bit per second transfer rate

  a huge decrease in the quality of their files

 4. What are main reasons for compressing files?

  Less storage space required

  All of the above

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

  Smaller attachments for email

 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, rather than the data, is really just the first sentence (being repeated)

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

  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

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

  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 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 = compressed data size / original data size x 2

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

  Compression ratio = original data size / compressed data size

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

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

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

  Compresion is never used by video and music streaming services

  increase the bit rate per second

 11. The two types of compression are:

  lossy, lossless

  mossy, mossless

  mismatch, match

  tight, open

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

   lossy compression

  lossless compression

  open compression

  tight 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)

  is too small to compress so is discarded altogether

  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

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

  None of the above

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

  They are vastly different and hugely matter

 15. What is the benefit of compressing an image file for a use on a 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

  It takes up less storage space on your website

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

  TRUE

  FALSE

 17. Lossless compression is when you are:

  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

  reducing file size with a massive reduction 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. 

  MORE

  LESS

  None of the above

  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

  video cards, CPUs and operating system

  programs, text documents, and source code

  None of the above

 21. Two common lossless compression algorithms are:

  minch compression and zilch compression

  Apple Compression and IBM HoHoMon

  huffman coding and Run length encoding (RLE)

  All of the above

 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 number of times the file has been compressed

  marking the binary file size

  marking the number of bits contained in the file

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

  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 with several pixels from it

  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 short runs of text bits happen to occur in sequence, it is useful

  None of the above

  where there are pixels it is even less useful

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