Mgmt. 298D: Electronic Commerce
Prof. A. Geoffrion
 
Notes on Demo 6
(Compression, Encoding, Encrypting, Archiving Files)
 
 
 
These notes are designed to be read in conjunction with the Demo 6 document, to make it into more of a self-demo.  Words in italics (in that document) are vocabulary with which you need to be familiar.

Three of these topics will remain important for the foreseeable future.  Encoding will be required less and less as the Internet infrastructure and its application software improves, but

Preliminaries

This section is pretty much self-explanatory.  For the letter "a", notice how the 1-bits turn on exactly those values which, when added, yield 97.  Since "b" comes after "a" in the ASCII code, what is the byte for "b"?  You should verify to your own satisfaction that you can get 128 different bytes with the 8th bit (the leftmost one) off.  Only 127 you say?  You're forgetting the character formed by 00000000.  Answer to above question: 01100010.

Try opening bytes.bin with Word.  Its rendering of characters 0-31 and 128-255 is somewhat arbitrary, and depends strongly on the selected font.  A box appears when Word doesn't know what else to display.

Try opening bytes.htm with your browser.  This is a useful file to keep around for reference purposes, and to copy/paste from when you need a non-standard character in a Web page.

mixed is a binary file with no extension.  (Don't be alarmed, there is no rule requiring all files to have an extension.)  You will put it through all kinds of torture and, in the end, get it back.  You will compress it, encode it, and encrypt -- not sequentially, but starting with the same initial file each time.  Then you will archive these three results together with mixed.  You will unpack the archive to get the three result files -- a compressed version, an encoded version, and an encrypted version -- and finally you will uncompress, decode, and uncompress these to get the original file in every case.  This is pretty convincing proof that compression, encoding, encryption, and archiving are all perfectly reversable file operations.
 
 
Compression

Start with a right click on the original file, and select Add to Zip.  Presumably you already know how to use WinZip.
 
 
Encoding

Download uuencode.com and mixed to your computer, put them in the same folder, and run uuencode.com (double click it and supply the filename).
 
 
Encryption

Start with a right click on the original file, and select PGP/Encrypt.  Presumably you already know how to use PGP.
 
 
Archiving

Another simple exercise in using WinZip.
 
 
Examine

Look at all five files.  Notice how much smaller the zip file is, whereas the encoded file is a little larger.  All files use the 8th bit except (of course) the encoded file.  There is an evident pattern for all but the zip files.
 
 
Inversion
 
Unpack and uncompress both can be started with a right click and Extract To.

Decrypt can be started with a right click and PGP/Decrypt-Verify.

To decode, download uudecode.com to your computer, put it and mixed in the same folder, and run the program (double click it and supply the filename).