Question: Write compression and de-compression programs for the following file: chr1.phastCons60way.wigFix.gz from directory (small characters, the link is long) http://hgdownload.soe.ucsc.edu/goldenPath/mm10/phastCons60way/mm10.60way.phastCons/ This file has two types of

Write compression and de-compression programs for the following file: chr1.phastCons60way.wigFix.gz from directory (small characters, the link is long) http://hgdownload.soe.ucsc.edu/goldenPath/mm10/phastCons60way/mm10.60way.phastCons/

This file has two types of lines: scores and starts. A score is a single number, a multiple of 1/1000 that is between 0 and 1.

A start line looks like that: fixedStep chrom=chr1 start=3005431 step=1

Importantly, there are only 62,290 lines of the second type, so the compression strategy should focus on the rest of 142,782,023 lines. The second type of lines can be easily encoded with and extra symbol, say "f", followed by four bytes that encode the start value. Using the posted script, one can compute that the average length of Huffman codes for score lines as 6.68. However, the scores are not random but they tend to be similar to previous scores. If we encode the differences (between -1 and 1), the average code is 5 bits, even though we have 2001 codes rather tnan 1001. You task is to write a pair of programs, one that compresses and produces under 100 Mbytes, and one that decompresses and produces the original file of 850 Mbytes. Compare the compressed size and the running time with zip or gzip. You should submit two files of programs in C/C++ and a file explaining how to compile and run, and what is your experience with the programs: running time and compressed result. You can also submit extra files that the program may need, like tables of frequencies or a table of codes, and explain how to use them

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!