This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:fall2017:discrete:projects:dcf0 [2017/09/04 12:00] – [Encode] wedge | haas: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 " | + | * Revision 0.1: Enhanced included ' |
- | * Revision 0.2: Added a "Check Results" | + | * Revision 0.2: Filled out the " |
+ | * Revision 0.3: Added a "Check Results" | ||
+ | * Revision 0.4: Further enhanced ' | ||
+ | * Revision 0.5: After some absolutely incredible irc shenanigans in what I've come to call the " | ||
=====Objective===== | =====Objective===== | ||
To apply your skills in implementing an encoding scheme that, in ideal circumstances, | To apply your skills in implementing an encoding scheme that, in ideal circumstances, | ||
Line 273: | Line 276: | ||
| | ||
stride value: 1 byte | stride value: 1 byte | ||
- | read in: 67 bytes | + | read in: 62 bytes |
wrote out: 82 bytes | wrote out: 82 bytes | ||
- | inflation rate: 18.29% | + | inflation rate: 32.26% |
lab46: | lab46: | ||
</ | </ | ||
Line 314: | Line 317: | ||
<cli> | <cli> | ||
lab46: | lab46: | ||
- | 0000000: 6463 6658 2052 4c45 0001 0113 6f75 742f dcfX RLE....out/ | + | 0000000: 6463 6658 2052 4c45 0001 010e 696e 2f73 dcfX RLE....in/s |
- | 0000010: | + | 0000010: |
- | 0000020: | + | 0000020: |
- | 0000030: 6908 6a07 6b06 6c05 6d04 6e03 6f02 7001 | + | 0000030: 066c 056d 046e 036f 0270 0171 010a .l.m.n.o.p.q.. |
- | 0000040: 7101 0a | + | |
lab46: | lab46: | ||
</ | </ | ||
Line 331: | Line 333: | ||
If you'd like to verify your implementations, | If you'd like to verify your implementations, | ||
- | 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: |
+ | |||
+ | < | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | To run it, you need a functioning **encode** and **decode** program | ||
+ | |||
+ | 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/ | + | - depending on the test, encodes |
- | | + | * if single step, result |
+ | | ||
- 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 | + | - Another checksum is taken of the new file in **o#/** |
- The checksums are compared. If they match, " | - The checksums are compared. If they match, " | ||
Line 346: | Line 362: | ||
<cli> | <cli> | ||
lab46: | lab46: | ||
- | sample0.txt | + | ================================================= |
- | sample1.txt | + | = PHASE 0: Raw -> Encode data verification test = |
- | sample2.bmp | + | ================================================= |
- | sample3.wav | + | in/sample0.txt |
+ | in/sample1.txt | ||
+ | in/sample2.bmp | ||
+ | in/sample3.wav | ||
+ | |||
+ | ================================================= | ||
+ | = PHASE 1: Decode -> Raw data verification test = | ||
+ | ================================================= | ||
+ | in/ | ||
+ | in/ | ||
+ | in/ | ||
+ | in/ | ||
+ | |||
+ | ================================================ | ||
+ | = PHASE 2: Raw -> Encode -> Decode -> Raw test = | ||
+ | ================================================ | ||
+ | in/ | ||
+ | in/ | ||
+ | in/ | ||
+ | in/ | ||
+ | |||
+ | ============================================= | ||
+ | = PHASE 3: Decode -> Raw -> Encode Raw test = | ||
+ | ============================================= | ||
+ | in/ | ||
+ | in/ | ||
+ | in/ | ||
+ | in/ | ||
</ | </ | ||
Line 357: | Line 401: | ||
<cli> | <cli> | ||
lab46: | lab46: | ||
- | sample0.txt | + | ================================================= |
- | sample1.txt | + | = PHASE 0: Raw -> Encode data verification test = |
- | sample2.bmp | + | ================================================= |
- | sample3.wav | + | in/sample0.txt |
+ | in/sample1.txt | ||
+ | in/sample2.bmp | ||
+ | in/sample3.wav | ||
+ | |||
+ | ================================================= | ||
+ | = PHASE 1: Decode -> Raw data verification test = | ||
+ | ================================================= | ||
+ | in/ | ||
+ | in/ | ||
+ | in/ | ||
+ | in/ | ||
+ | |||
+ | ================================================ | ||
+ | = PHASE 2: Raw -> Encode -> Decode -> Raw test = | ||
+ | ================================================ | ||
+ | in/ | ||
+ | in/ | ||
+ | in/ | ||
+ | in/ | ||
+ | |||
+ | ============================================= | ||
+ | = PHASE 3: Decode -> Raw -> Encode Raw test = | ||
+ | ============================================= | ||
+ | in/ | ||
+ | in/ | ||
+ | in/ | ||
+ | in/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | ====Incomplete operation==== | ||
+ | Should something not work at all (like a missing or uncompiling decode binary), you'll see a " | ||
+ | |||
+ | < | ||
+ | lab46: | ||
+ | ... | ||
+ | |||
+ | ================================================= | ||
+ | = PHASE 1: Decode -> Raw data verification test = | ||
+ | ================================================= | ||
+ | in/ | ||
+ | in/ | ||
+ | in/ | ||
+ | in/ | ||
+ | ... | ||
</ | </ | ||