Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve it with C++ make sure your frequencies for character are correct NOTE: DO NOT PUT YOUR ANSWER IF IT IS NOT CORRECT THAT IS

Solve it with C++

make sure your frequencies for character are correct

NOTE: DO NOT PUT YOUR ANSWER IF IT IS NOT CORRECT THAT IS THE FIFTH TIME I POST THE SAME QUESTION AND THE SAME PERSON KEEP GIVING ME THE SAME WRONG ANSWER. IF YOU ARE READING THIS PLEEEEEEAS FIX YOUR CODE THEN UPLOAD IT HERE THANK YOU!!

image text in transcribed

Digital Communications Term Project: Simulation of Huffman Algorithm Huffman encoding is an example of a lossless compression algorithm that works particularly well on text but can, in fact, be applied to any type of file. Using Huffman encoding to compress a file can reduce the storage it requires by a third, half, or even more, in some situations. The purpose of this project is to compress and decompress files using the standard Huffman algorithm for encoding and decoding. The steps you'll take to perform a Huffman encoding of a given text source file into a destination compressed file are: a) Count frequencies: Examine a source file's contents and count the number of occurrences of each character, and store them. b) Build encoding tree: Build a binary tree with a particular structure, where each node represents a character and its count of occurrences in the file. c) Build encoding map: Traverse the binary tree to discover the binary encodings of each character. d) Encode data: Re-examine the source file's contents, and for each character, output the encoded binary version of that character to the destination file. Example: Suppose you have a file named "project.txt" whose contents are ab ab cab." which occupies 80 bits in ASCII (including spaces and period). You have to: 1. Encode this file text into a shorter binary representation using the previous encoding map and evaluate the coding efficiency. 2. Suppose you are given the same encoding tree above, decode a file containing the following bits: 1110010001001010011 Your code should work for Term Project.mat file (by using Matlab)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PC Magazine Guide To Client Server Databases

Authors: Joe Salemi

1st Edition

156276070X, 978-1562760700

More Books

Students also viewed these Databases questions