User Tools

Site Tools


haas:fall2017:discrete:projects:dcf2

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
haas:fall2017:discrete:projects:dcf2 [2017/10/15 21:47] – [Grabit Integration] wedgehaas:fall2017:discrete:projects:dcf2 [2017/10/21 12:01] (current) – [This week's algorithm: RLE+control_sequences] wedge
Line 36: Line 36:
 Encoding with our new algorithm, we would get the following (our control sequence byte will be a 2A, then followed by the count byte, then the stride byte, then the encoded data): Encoding with our new algorithm, we would get the following (our control sequence byte will be a 2A, then followed by the count byte, then the stride byte, then the encoded data):
  
-  * 2A 06 01 61 62 63 64 62 63 64 62 63 2A 07 01 64 65 66 67 68 69 6A 6B 6C 6D 2A 06 6E 6F 77 78 79 7A+  * 2A 06 01 61 62 63 64 62 63 64 62 63 2A 07 01 64 65 66 67 68 69 6A 6B 6C 6D 2A 06 01 6E 6F 77 78 79 7A
     * 34 bytes     * 34 bytes
  
Line 165: Line 165:
   * argv[0]: program invocation (path + program name)   * argv[0]: program invocation (path + program name)
   * argv[1]: our input file   * argv[1]: our input file
-  * argv[2]: our control sequence byte (0-255)+  * argv[2]: our output path 
 +  * argv[3]: our stride value (1-255) 
 +  * argv[4]: our control sequence byte (0-255)
  
 ====Simple argument checks==== ====Simple argument checks====
Line 184: Line 186:
  
 <cli> <cli>
-lab46:~/src/discrete/dcf2$ ./encode sample2.bmp 3 37+lab46:~/src/discrete/dcf2$ ./encode sample2.bmp 3 37
 dcfX v3 encode details dcfX v3 encode details
 ================================== ==================================
 input name length: 11 bytes input name length: 11 bytes
    input filename: sample2.bmp    input filename: sample2.bmp
-  output filename: sample2.bmp.rle+  output filename: ./sample2.bmp.rle
      control byte: 0x25      control byte: 0x25
      stride value: 3 bytes      stride value: 3 bytes
Line 202: Line 204:
  
 <cli> <cli>
-lab46:~/src/discrete/dcf2$ ./decode sample5.txt.rle+lab46:~/src/discrete/dcf2$ ./decode sample5.txt.rle .
     input filename: sample5.txt.rle     input filename: sample5.txt.rle
 output name length: 11 bytes output name length: 11 bytes
-   output filename: sample5.txt+   output filename: ./sample5.txt
        header text: dcfX RLE v3        header text: dcfX RLE v3
       control byte: 0x29       control byte: 0x29
haas/fall2017/discrete/projects/dcf2.1508104035.txt.gz · Last modified: 2017/10/15 21:47 by wedge