User Tools

Site Tools


haas:fall2017:discrete:projects:dcf0

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:dcf0 [2017/09/04 13:51] – [Successful operation] wedgehaas:fall2017:discrete:projects:dcf0 [2017/09/06 17:19] (current) – [Decode] wedge
Line 11: Line 11:
 Any changes that have been made. Any changes that have been made.
  
-  * Revision 0.1: Filled out the "Verify Results" section (20170903) +  * Revision 0.1: Enhanced included 'check' script (20170901) 
-  * Revision 0.2: Added a "Check Results" section (20170904)+  * Revision 0.2: Filled out the "Verify Results" section (20170903) 
 +  * Revision 0.3: Added a "Check Results" section (20170904) 
 +  * Revision 0.4: Further enhanced 'check' script, and updated project page verify section to reflect improved functionality (20170904) 
 +  * Revision 0.5: After some absolutely incredible irc shenanigans in what I've come to call the "discrete irc labor day power hours", some 1337 h4xxing was done, and it was discovered that the included in/sample2.bmp.rle file was actually incorrectly encoded. Finally a seemingly working copy was created, only to later discover that, while not incorrect, was also not optimal. So, as of 8pm Monday Sept 4th, a more optimal and correct in/sample2.bmp.rle file was placed in the project directory. Please run 'make getdata' to share in the goodness. And thank you to everyone who showed up- THAT is why I do what I do. (20170904)
 =====Objective===== =====Objective=====
 To apply your skills in implementing an encoding scheme that, in ideal circumstances, will lead to a smaller storage footprint. To apply your skills in implementing an encoding scheme that, in ideal circumstances, will lead to a smaller storage footprint.
Line 275: Line 278:
            read in: 62 bytes            read in: 62 bytes
          wrote out: 82 bytes          wrote out: 82 bytes
-    inflation rate: 24.39%+    inflation rate: 32.26%
 lab46:~/src/discrete/dcf0$  lab46:~/src/discrete/dcf0$ 
 </cli> </cli>
Line 330: Line 333:
 If you'd like to verify your implementations, there is a **check** script included when you use the **grabit** tool to obtain the skeleton files and data. If you'd like to verify your implementations, there is a **check** script included when you use the **grabit** tool to obtain the skeleton files and data.
  
-To run it, you need a functioning **encode** and **decode** program.+**NOTE:** As there have been updates to this script since the project was first released, you may want to manually obtain a copy, to ensure you have the latest and greatest: 
 + 
 +<cli> 
 +lab46:~/src/discrete/dcf0$ cp /var/public/fall2017/discrete/dcf0/check . 
 +</cli> 
 + 
 +To run it, you need a functioning **encode** and **decode** program (although it does its best otherwise). 
 + 
 +It runs through four separate tests, storing the results in a corresponding **o#/** directory (sometimes, if applicable, intermediate results in a corresponding **m#/** directory): 
 + 
 +  * test 0: take the raw data files in **in/** and encodes them (**o0/**) 
 +  * test 1: take pre-encoded data files in **in/** and decodes them (**o1/**) 
 +  * test 2: take the raw data files in **in/**, encodes them (**m2/**), then decodes them (**o2/**) 
 +  * test 3: take pre-encoded data files in **in/**, decodes them (**m3/**), then encodes them (**o3/**)
  
 How it works: How it works:
  
-  - encodes a file in the **in/** data directory, storing the encoded result in **out/** with a **.rle** extension added +  - depending on the test, encodes or decodes a file in the **in/** directory
-  decodes the encoded file in the **out/** directory, storing the decoded result in a new **tmp/** directory (once again lacking the **.rle** extension).+    * if single step, result is in **o#/** directory 
 +    if multi-step, result is in **m#/** directory, then second operation puts its result into **o#/** 
   - A checksum is taken of the original file in **in/**   - A checksum is taken of the original file in **in/**
-  - Another checksum is taken of the newly decoded file in **tmp/**+  - Another checksum is taken of the new file in **o#/**
   - The checksums are compared. If they match, "OK" is displayed; if they do not match, a corresponding "FAIL" message appears.   - The checksums are compared. If they match, "OK" is displayed; if they do not match, a corresponding "FAIL" message appears.
  
Line 384: Line 401:
 <cli> <cli>
 lab46:~/src/discrete/dcf0$ ./check lab46:~/src/discrete/dcf0$ ./check
-sample0.txt              : OK +================================================= 
-sample1.txt              : OK += PHASE 0: Raw -> Encode data verification test = 
-sample2.bmp              : FAIL: checksums do not match +================================================= 
-sample3.wav              : OK+in/sample0.txt -> o0/sample0.txt.rle: OK 
 +in/sample1.txt -> o0/sample1.txt.rle: OK 
 +in/sample2.bmp -> o0/sample2.bmp.rle: FAIL: checksums do not match 
 +in/sample3.wav -> o0/sample3.wav.rle: OK 
 + 
 +================================================= 
 += PHASE 1: Decode -> Raw data verification test = 
 +================================================= 
 +in/sample0.txt.rle -> o1/sample0.txt: OK 
 +in/sample1.txt.rle -> o1/sample1.txt: OK 
 +in/sample2.bmp.rle -> o1/sample2.bmp: FAIL: checksums do not match 
 +in/sample3.wav.rle -> o1/sample3.wav: OK 
 + 
 +================================================ 
 += PHASE 2: Raw -> Encode -> Decode -> Raw test = 
 +================================================ 
 +in/sample0.txt -> m2/sample0.txt.rle -> o2/sample0.txt: OK 
 +in/sample1.txt -> m2/sample1.txt.rle -> o2/sample1.txt: OK 
 +in/sample2.bmp -> m2/sample2.bmp.rle -> o2/sample2.bmp: FAIL: checksums do not match 
 +in/sample3.wav -> m2/sample3.wav.rle -> o2/sample3.wav: OK 
 + 
 +============================================= 
 += PHASE 3: Decode -> Raw -> Encode Raw test = 
 +============================================= 
 +in/sample0.txt.rle -> m3/sample0.txt -> o3/sample0.txt.rle: OK 
 +in/sample1.txt.rle -> m3/sample1.txt -> o3/sample1.txt.rle: OK 
 +in/sample2.bmp.rle -> m3/sample2.bmp -> o3/sample2.bmp.rle: FAIL: checksums do not match 
 +in/sample3.wav.rle -> m3/sample3.wav -> o3/sample3.wav.rle: OK 
 + 
 +</cli> 
 + 
 +====Incomplete operation==== 
 +Should something not work at all (like a missing or uncompiling decode binary), you'll see a "MISSING" message: 
 + 
 +<cli> 
 +lab46:~/src/discrete/dcf0$ ./check 
 +... 
 + 
 +================================================= 
 += PHASE 1: Decode -> Raw data verification test = 
 +================================================= 
 +in/sample0.txt.rle -> o1/sample0.txt: MISSING: decode 
 +in/sample1.txt.rle -> o1/sample1.txt: MISSING: decode 
 +in/sample2.bmp.rle -> o1/sample2.bmp: MISSING: decode 
 +in/sample3.wav.rle -> o1/sample3.wav: MISSING: decode 
 +...
 </cli> </cli>
  
haas/fall2017/discrete/projects/dcf0.1504533114.txt.gz · Last modified: 2017/09/04 13:51 by wedge