Implement runlength encoding and decoding

Assignment Help C/C++ Programming
Reference no: EM132168005

Description: In this assignment, you are going to implement runlength encoding and decoding. In addition, the runlength code needs to write/read to/from a file. The encoding and decoding guidelines are provided as follows

In Encoding

1. First, you need to reordering the data matrix C in a zig zag way.

2. Print out the data in zig zag order

3. Count the consecutive occurrence

4. Print out the value and its consecutive occurrence

5. Open the file and Save the sequence to a file in binary mode as
- If the value is positive, the sign is 0; otherwise 1
- Save the sign using 1 bit
- Save the occurrence using 7 bits
- Save the absolute value using 8 bits (K bits in general)
- Flush the buffer
- Close the file

In Decoding
6. Open the file and Read the sequence from the file in binary mode as
- Read sign (1 bit)
- Read occurrence (7 bits)
- Read value (8 bits - K bits in general) and correct the sign
- Repeat until the end of file
- Close the file

7. Store the sequence back to data

8. Print out the sequence

9. Finally, reverse the zig zag data back to a matrix.

10. PrintMatrix C2 where C2 is the reconstructed matrix

Attachment:- Assignment.rar

Reference no: EM132168005

Questions Cloud

How business law concepts apply today or in the future : What new developments do you think will present the need to rethink and re-evaluate how business law concepts apply today or in the future?
How many users per year are needed to justify the road : A road costs $450,000 to build and $12,000 per year for street cleaning. The road is re-striped every 2 years for $28,000 and repaved every 10 years.
Both hard and soft controls may be used at organization : Both hard and soft controls may be used at an organization. An example of a hard control is...
Accountability from the marketing function : Why are companies pushing for more accountability from the marketing function?
Implement runlength encoding and decoding : Implement runlength encoding and decoding. In addition, the runlength code needs to write/read to/from a file. The encoding and decoding guidelines
Implications for american society in terms of economic trend : The 1920s introduced many modern conveniences, such as the widespread use of the washing machine, and many modern ideas, such as buying on credit.
How would on define a good decision : 1. How would on define a good decision? what is the logic behind it? 2. what are similarities and distinctions between management and leadership?
Find the after-tax cash flow : The purchase of a minicomputer is being considered. The corporation's taxable income exceeds $25 million. The first cost is $19,000, maintenance is $4500 per.
What tax is paid in the given situation : If the office is closed early in year 6 and the furniture is sold to a secondhand office furniture store for 10% of its initial cost, what tax is paid?

Reviews

len2168005

11/16/2018 1:22:26 AM

Grading: Submit your source files (zip to a folder) along with a readme indicating how to compile your files via blackboard. All assignments will be tested under Unix. Apply makefile to Compile and Link Successfully – 10 points Use separate source and header files (file, matrix, runlength) - 10 points Correct Encoding – 30 points Correct De coding – 30 points

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd