This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:discrete:fall2022:projects:rle2 [2022/10/30 16:00] – [VERIFICATION] hcordell | notes:discrete:fall2022:projects:rle2 [2022/11/03 02:53] (current) – [PROGRAM] dkienenb | ||
---|---|---|---|
Line 11: | Line 11: | ||
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. | 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===== | =====SPECIFICATIONS===== | ||
+ | If a control byte is present inside your data but does not include encoded data with it, you will have to make modifications to your encode/ | ||
+ | |||
+ | =====REFERENCES===== | ||
+ | STRIDES and CONTROL BYTES for given files: \\ | ||
+ | **sample0.txt: | ||
+ | **sample1.txt: | ||
+ | **sample2.bmp: | ||
+ | **sample3.wav: | ||
+ | **sample5.txt: | ||
Please reference the image below to find the hexadecimal value of the ASCII symbols: | Please reference the image below to find the hexadecimal value of the ASCII symbols: | ||
Line 39: | Line 48: | ||
</ | </ | ||
+ | **NOTE** Control value is input as a decimal 0-255. When running encode for this project, the control value should be input as ' | ||
+ | |||
+ | **NOTE** To convert a string argument into a usable decimal, set your desired variable equal to //atoi()// and put the string argument you wish to convert in the function. This works with unsigned chars as well as ints. If you atoi to an unsigned char, it is easy to put it into the header array with a simple assignment. | ||
===Explanation=== | ===Explanation=== | ||
Input-file-> | Input-file-> | ||
- | Outpath-> | + | |
+ | Outpath-> | ||
Stride-> | Stride-> | ||
+ | |||
Control-> | Control-> | ||
=====DATA HEADER SPECIFICATIONS===== | =====DATA HEADER SPECIFICATIONS===== |