JZIPUpdate

Hosted by SourceForge.net Logo IE7 Enhanced

How it Works

To minimize data transfer over the network, JZIPUpdate issues only two HTTP requests and transfers all data in compressed form. Here's how it works:

  1. The client starts by reading the names and CRC checksums of all ZIP entries in the archive it is supposed to update.
  2. The client requests the index file from the specified URL, by appending .idx to the the URL, e.g. for http://www.example.com/files/monkey.zip the client will expect the index file at http://www.example.com/files/monkey.zip.idx.
  3. The client-side pairs of ZIP entry names and CRC checksums are compared to the server-side pairs from the index file. This results in a diff-like set of patch instructions like:
    	
    	ADD /sounds/dog.ogg
    	UPD /sounds/cat.ogg
    	REM /images/donkey.jpg
    	NOOP /textures/monkey.jpg
    	
    	
    Actually, resources flagged as NOOP are removed from the diff, to decrease its size and to speed up lookups.
  4. Resources flagged as ADD or UPD are downloaded from the web server:
  5. Now that both the client-side and server-side resources are available on the client, the patching begins:
    A temporary ZIP file is created and all resources flagged as NOOP are copied over, resources flagged as REM are skipped. Resources flagged as ADD or UPD are taken from the multipart response sent by the server.
  6. Finally, the original archive is deleted and the temporary ZIP file is moved into its place, and the unparsed multipart data is removed from the system's temp directory.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries.