User Tools

Site Tools


notes:discrete:fall2022:projects:rle0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
notes:discrete:fall2022:projects:rle0 [2022/09/07 18:58] – [PROGRAM] decoder specifications and 2nd argument hcordellnotes:discrete:fall2022:projects:rle0 [2022/09/07 22:57] (current) – [PROGRAM] abarbcal
Line 18: Line 18:
 The RLE algorithm will encode this data by replacing the repeated characters with a count number and a single value. The RLE algorithm will encode this data by replacing the repeated characters with a count number and a single value.
  
-<code>4a2b1c1d1e1f5g</code>+<code>4a2b1c1d1e1f4g</code>
  
 There are 4 a's (0x61), 2 b's(0x62), 1 c(0x63), 1 d(0x64), 1 e(0x65), 1 f (0x66), and 5 g's (0x67). There are 4 a's (0x61), 2 b's(0x62), 1 c(0x63), 1 d(0x64), 1 e(0x65), 1 f (0x66), and 5 g's (0x67).
Line 109: Line 109:
  argv[0] argv[1] argv[2]  argv[0] argv[1] argv[2]
  
-./decode sample0.txt.rle+./decode sample0.txt.rle sample0.txt
 </cli> </cli>
 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. 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.
notes/discrete/fall2022/projects/rle0.1662577098.txt.gz · Last modified: 2022/09/07 18:58 by hcordell