Computers and Technology

Objective: Gain more experience with MIPS programming. and in using macros. Overview: In this program you will implement a very simple compression algorithm, RLE, as described in Wikipedia: Run-length encoding (RLE) is a very simple form of lossless data compression in which runs of data (that is, sequences in which the same data value occurs in many consecutive data elements) are stored as a single data value and count, rather than as the original run. This is most useful on data that contains many such runs For example, 'AABBBC" would be encoded as: A2B3C1 Macro File: Create macros to print an int, print a char, print a string, get a string from the user, open file, close file, read file, and allocate heap memory. You can use more macros than these if you like. Main Program File:
1. Allocate 1024 bytes of dynamic memory and save the pointer to the area.
2. The main program is a loop in which you ask the user for a filename. If they enter nothing for the filename, exit the program. Otherwise:
a. Open the file for reading. If the file does not exist, print an error message and terminate the program
b. Read the file into an input buffer space of 1024 bytes
c. Close the file.
d. Output the original data to the console.
e. Call the compression function. Save the size of the compressed data in memory.
f. Call a function to print the compressed data.
g. Call the uncompress function. Print the uncompressed data.
h. Print the number of bytes in the original and compressed data.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 19:40, queenskyyt
Write the quartstogallons java class that declares a named constant to hold the number of quarts in a gallon (4). also declare a variable to represent the number of quarts needed for a painting job, and assign an appropriate value—for example, 18. compute and display the number of gallons and quarts needed for the job. display explanatory text with the values, for example:
Answers: 2
image
Computers and Technology, 22.06.2019 19:40, rakanmadi87
Solve the following javafx application: write a javafx application that analyzes a word. the user would type the word in a text field, and the application provides three buttons for the following: - one button, when clicked, displays the length of the word.- another button, when clicked, displays the number of vowels in the word.- another button, when clicked, displays the number of uppercase letters in the word(use the gridpane or hbox and vbox to organize the gui controls).
Answers: 1
image
Computers and Technology, 22.06.2019 22:00, zay179
What is a distinguishing feature of today’s graphic application software?) graphic applications are used today on a variety of devices, including touch-screen kiosks and mobile phones.
Answers: 3
image
Computers and Technology, 23.06.2019 08:00, hernandez09297
What is a scenario where records stored in a computer frequently need to be checked
Answers: 2
Do you know the correct answer?
Objective: Gain more experience with MIPS programming. and in using macros. Overview: In this progra...

Questions in other subjects: