Write a program using MIPS assembly language to do the following The compression function implements the RLE
Question:
Write a program using MIPS assembly language to do the following
The compression function implements the RLE algorithm and stores the compressed data in the heap. Before the function call, set $a0 to the address of the input buffer (read in from a file), set $a1 to the address of the compression buffer, set $a2 to the size of the original file. The function should “return” the size of the compressed data in $v0.
The print function will repeat characters as indicated in the compressed file. For example, if the compressed file is ‘A2B3C1’ it will print ‘AABBBC’.
The uncompression function does the reverse of the compression function, saving the result to an uncompressed buffer in static memory.
EXAMPLE INPUT/OUTPUT
An Introduction to Measure Theoretic Probability
ISBN: 978-0128000427
2nd edition
Authors: George G. Roussas