Run length encoding and Dictionary encoding

Cards (18)

  • What are the two main types of compression discussed?
    Lossy and lossless compression
  • What are the two methods of lossless compression mentioned?
    Run length encoding and dictionary coding
  • What type of documents is dictionary coding ideal for?
    Text-based documents
  • What type of files is run length encoding more suited for?
    Bitmap images
  • How does dictionary coding allow for file recreation?
    By encoding data with an index and unique code
  • What does the compressed file consist of in dictionary coding?
    The dictionary index and sequence of occurrences
  • How many bits are used per character in 8-bit ASCII encoding?
    8 bits
  • How many bits are needed to store numbers 1 to 17?
    5 bits
  • What is the main advantage of dictionary coding?
    It allows recreation of the entire message
  • What are bitmap images made up of?
    Discrete pixels
  • Why is storing binary for each pixel inefficient?
    Many contiguous pixels have the same color
  • What color depth is used for the example with two colors?
    One bit
  • What do frequency data pairs represent in run length encoding?
    Contiguous pixels of the same color
  • What does a frequency data pair like "22 0" indicate?
    22 contiguous white pixels
  • How do run length encoding and dictionary coding differ in application?
    • Run length encoding: Ideal for bitmap images
    • Dictionary coding: Ideal for text-based documents
  • What are the key components of dictionary coding?
    • Dictionary index
    • Sequence of occurrences
    • Unique codes for data items
  • What are the steps to recreate an original file using dictionary coding?
    1. Use the dictionary index
    2. Follow the sequence of occurrences
    3. Reconstruct the original data
  • What are the advantages of lossless compression techniques?
    • Original quality is preserved
    • Efficient storage of data
    • Suitable for various file types