User Tools

Site Tools


notes:discrete:fall2022:projects:rle1

This is an old revision of the document!


BACKGROUND

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.

SPECIFICATIONS

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

CUSTOMIZATION: variable stride

PROGRAM

PROGRAM

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 name of the original file appending a .lre at the end.

Decode program will take two arguments:

./decode INFILE OUTFILE
 argv[0] argv[1] argv[2]

./decode sample0.txt.rle sample0.txt

The decoder should be able to read the header and find out the filename if a second argument is not given. If a second argument is given it will use the second argument instead of taking the filename from the header. Decode will output a file of similar name without the .rle extension after running your decoder.

OUTPUT SPECIFICATIONS

VERIFICATION

notes/discrete/fall2022/projects/rle1.1664465032.txt.gz · Last modified: 2022/09/29 15:23 by abarbcal