This is an old revision of the document!
Version 2 of our RLE algorithm.
This time we will be encoding and decoding similar data focusing on more than one byte.
Run Length Encoding (RLE) Data Compression Algorithm
Run-length encoding (RLE) algorithm is a lossless compression of runs of data, where repeated sequences of data are stored as a representation of a single data value and its count (how many times it repeats consecutively). RLE encoding is commonly used in JPEG, TIFF, and PDF files, to name a few examples.
Please reference the image below to find the hexadecimal value of the ASCII symbols:
*Our task is to ask questions on Discord or in class and document our findings on this wiki page collaboratively, regarding the functionality of this project.
*For anybody interested in editing the wiki page, here is the dokuwiki user guide: https://www.dokuwiki.org/wiki:syntax#basic_text_formatting -Ash
Encode program will take two arguments:
./encode INFILE STRIDE argv[0] argv[1] argv[2] ./encode sample0.txt 2
Encoder will output a file with the original file's name, appending a .lre
at the end.
Decode program will take only one argument, the encoded .lre
file:
./decode INFILE argv[0] argv[1] ./decode sample0.txt.rle
The decoder should be able to read the header and find out the original filename Decode will output a file with the name of the original file, without the .rle.