question archive C Programming (c89): Given an !RLE file simply decode it using a function
Subject:Computer SciencePrice: Bought3
C Programming (c89):
Given an !RLE file simply decode it using a function. This function performs run length decoding on the bytes of the
supplied filename and writes the result to disk as the contents of a
newly created file with the supplied filename MINUS the ".rle"
extension.
For example, if the supplied filename is "test.bin.rle", this
function will create the file "test.bin", whose contents will be
the run length decoded bytes of "test.bin.rle".
This function also checks that the supplied filename has both the
".rle" extension and !RLE "magic" byte sequence. If either is not
present, this function prints an appropriate error message to stderr,
void expand(const char *filename) {
/* Your code goes here! */ }