Fill This Form To Receive Instant Help
Homework answers / question archive / Programming Assignment 1 Problem: For this assignment, you will create a parallel fixed-length code decompressor using the tools we learned in class to create multiple processes and threads
Programming Assignment 1
Problem:
For this assignment, you will create a parallel fixed-length code decompressor using the tools we learned in class to create multiple processes and threads.
Computers represent a character as a sequence of 8 bits, which means you can represent up to 256 symbols per character. However, depending on the source, it is common to have messages/files using an alphabet with a size of fewer than 256 symbols.
The simplest way to achieve compression is to use a fixed-length code generator. The idea behind this type of code generator is to assign a fixed-length bit sequence to each alphabet symbol.
Given an alphabet (where each symbol is represented by a character and a decimal value with the code of the symbol), you need to implement a fixed-length code decompressor based on the following steps:
- An integer value representing the number of symbols in the alphabet
- n lines (where n is the number of symbols in the alphabet) with a char representing the value of the symbol and an integer value representing the symbol's code (in decimal notation).
- A string representing the compressed message (sequence of bits).
Given the previous format, the following file represents a valid input file:
3
a 2
b 4
c 5
010010010100101101101
- Determines the binary representation of the symbol's code.
- Determines the frequency of the symbol in the compressed message.
Alphabet:
Character: a, Code: 010, Frequency: 3
Character: b, Code: 100, Frequency: 1
Character: c, Code: 101, Frequency: 3
Decompressed message: aaabccc
NOTES: