User Tools

Site Tools


haas:fall2017:discrete:projects:dcf1

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:dcf1 [2017/09/09 14:22] – [Submission Criteria] wedgehaas:fall2017:discrete:projects:dcf1 [2017/10/09 14:21] (current) wedge
Line 3: Line 3:
 <WRAP><fs 150%>CSCS2330 Discrete Structures</fs></WRAP> <WRAP><fs 150%>CSCS2330 Discrete Structures</fs></WRAP>
 </WRAP> </WRAP>
- 
-~~TOC~~ 
  
 ======Project: RUN-LENGTH ENCODING - DATA COMPRESSION FUN (dcf1)====== ======Project: RUN-LENGTH ENCODING - DATA COMPRESSION FUN (dcf1)======
 +
 +=====Errata=====
 +Any changes that have been made.
 +
 +  * Revision 0.1: Updating dcfX v2 spec and added some additional implementation constraints (20170907)
 +  * Revision 0.2: Finalized project data files, adapted included 'check' script for dcf1 (20170909)
 +  * Revision 0.3: Updated check script so it no longer gives out false negatives. **make getdata** to grab the updated copy (20170921)
  
 =====Objective===== =====Objective=====
Line 55: Line 60:
 ====Header==== ====Header====
 It is actually **identical** to the specifications of last week, save for four changes: It is actually **identical** to the specifications of last week, save for four changes:
-  - we're no longer hard-coding the **stride** value to 1 (byte 10)+  - we're no longer hard-coding the **stride** value to 1 (byte 10), but instead obtaining it from the command-line (argv[3]), any valid value between 1 and 255 (inclusive).
   - we're placing a 2 in the version byte (byte 9)   - we're placing a 2 in the version byte (byte 9)
   - the embedded source file name will now be stripped of any path (ie "in/sample0.txt" should now just be stored as "sample0.txt")   - the embedded source file name will now be stripped of any path (ie "in/sample0.txt" should now just be stored as "sample0.txt")
   - the destination argument (argv[2]) is now merely a path, NOT a path+filename (ie "out/sample0.txt.rle" should now just be "out")   - the destination argument (argv[2]) is now merely a path, NOT a path+filename (ie "out/sample0.txt.rle" should now just be "out")
     * the destination file is a combination of the destination path + source filename + ".rle" extension (for encode).     * the destination file is a combination of the destination path + source filename + ".rle" extension (for encode).
 +
 +And specifically for **decode**, the source filename will be retrieved out of the post-header information at the start of the encoded file.
  
 Every RL-encoded file will start with the following 12-byte header: Every RL-encoded file will start with the following 12-byte header:
Line 162: Line 169:
 ‘/var/public/SEMESTER/discrete/dcf1/encode.c’ -> ‘/home/USERNAME/src/discrete/dcf1/encode.c’ ‘/var/public/SEMESTER/discrete/dcf1/encode.c’ -> ‘/home/USERNAME/src/discrete/dcf1/encode.c’
 ‘/var/public/SEMESTER/discrete/dcf1/decode.c’ -> ‘/home/USERNAME/src/discrete/dcf1/decode.c’ ‘/var/public/SEMESTER/discrete/dcf1/decode.c’ -> ‘/home/USERNAME/src/discrete/dcf1/decode.c’
-‘/var/public/SEMESTER/discrete/dcf1/data/sample0.txt’ -> ‘/home/USERNAME/src/discrete/dcf1/data/sample0.txt’ +...
-‘/var/public/SEMESTER/discrete/dcf1/data/sample1.txt’ -> ‘/home/USERNAME/src/discrete/dcf1/data/sample1.txt’ +
-‘/var/public/SEMESTER/discrete/dcf1/data/sample2.bmp’ -> ‘/home/USERNAME/src/discrete/dcf1/data/sample2.bmp’ +
-‘/var/public/SEMESTER/discrete/dcf1/data/sample3.wav’ -> ‘/home/USERNAME/src/discrete/dcf1/data/sample3.wav’ +
-‘/var/public/SEMESTER/discrete/dcf1/data/sample4.bmp.rle’ -> ‘/home/USERNAME/src/discrete/dcf1/data/sample4.bmp.rle’ +
-‘/var/public/SEMESTER/discrete/dcf1/data/sample5.txt.rle’ -> ‘/home/USERNAME/src/discrete/dcf1/data/sample5.txt.rle’ +
-‘/var/public/SEMESTER/discrete/dcf1/data/sample6.mp3.rle’ -> ‘/home/USERNAME/src/discrete/dcf1/data/sample6.mp3.rle’ +
-‘/var/public/SEMESTER/discrete/dcf1/data/sample7.txt.rle’ -> ‘/home/USERNAME/src/discrete/dcf1/data/sample7.txt.rle’ +
 make: Leaving directory '/var/public/SEMESTER/discrete/dcf1' make: Leaving directory '/var/public/SEMESTER/discrete/dcf1'
 lab46:~/src/discrete$ cd dcf1 lab46:~/src/discrete$ cd dcf1
Line 264: Line 263:
  
 <cli> <cli>
-lab46:~/src/discrete/dcf1$ ./decode data/sample5.txt.rle +lab46:~/src/discrete/dcf1$ ./decode in/sample0.txt.rle out 
-    input filename: data/sample5.txt.rle+    input filename: in/sample0.txt.rle
 output name length: 11 bytes output name length: 11 bytes
    output filename: sample5.txt    output filename: sample5.txt
Line 455: Line 454:
  
 You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches. You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches.
-=====Submission===== 
-====Project Submission==== 
-To submit this program to me using the **submit** tool, run the following command at your lab46 prompt: 
- 
-<cli> 
-lab46:~/src/discrete/dcf1$ make submit 
-removed 'decode' 
-removed 'encode' 
-removed 'errors' 
- 
-Project backup process commencing 
- 
-Taking snapshot of current project (dcf1)      ... OK 
-Compressing snapshot of dcf1 project archive   ... OK 
-Setting secure permissions on dcf1 archive     ... OK 
- 
-Project backup process complete 
- 
-Submitting discrete project "dcf1": 
-    -> ../dcf1-DATESTRING-HOUR.tar.gz(OK)  
- 
-SUCCESSFULLY SUBMITTED 
-</cli> 
- 
-You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches. 
- 
  
haas/fall2017/discrete/projects/dcf1.1504966966.txt.gz · Last modified: 2017/09/09 14:22 by wedge