Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem (in C language, submit a .c file) 1. Your program needs to compress a text file. The file text.txt contains the text to be

Problem (in C language, submit a .c file) 1. Your program needs to compress a text file. The file text.txt contains the text to be compressed and this file contains lower case letters only. The file alpha.txt contains the code for each letter.

2. You need to create a file called out.txt to store the compressed text.

3. It is sure that all the letters in text.txt will have one and only one corresponding code in the file alpha.txt.

4. Your program needs to achieve the indeed compression and could solve the "tail bit problem". You need to submit a one-page document to introduce how these two problems are solved. To solve the "tail bit problem", you may write some additional information into the output file.

Sample Input & Output The content of text.txt is adbb The content of alpha.txt is a 00 b 01 c 10 d 11 The content of out.txt is 5

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_2

Step: 3

blur-text-image_3

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

Advances In Knowledge Discovery In Databases

Authors: Animesh Adhikari, Jhimli Adhikari

1st Edition

3319132121, 9783319132129

More Books

Students also viewed these Databases questions

Question

How does penicillin enrichment make it easier to isolate mutants?

Answered: 1 week ago

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago