On Wed, Jun 17, 2009 at 4:27 AM, Tomeu Vizoso<to...@sugarlabs.org> wrote: > On Wed, Jun 17, 2009 at 03:15, C. Scott Ananian<csc...@cscott.net> wrote: >> When I wrote the sugar updater, I included all the code necessary to >> transfer only the changed portions of a large zip file. >> http://dev.laptop.org/git/users/cscott/sugar-update-control/tree/bitfrost/util/urlrange.py >> contains the interesting bits. The only missing piece was a proper >> manifest file format, which would allow you to download only the >> manifest to determine which bits have changed, so you could then >> download only the changed parts inside the zip file. > > What about reading the zip index (central directory?), then deciding > which files to download by the timestamp and file size?
That would work fine; we can read the zip index without downloading the entire file. It might require a bit of care on the part of the bundle-preparer to ensure that the timestamps of unmodified files are kept constant. The zip index also has a CRC32 of the file (see http://docs.python.org/library/zipfile.html). It should be noted that trusting the CRC32 to validate the file contents is insecure -- but IIRC the security of the update scheme relies on other signatures (probably still unimplemented -- do you know anything about that, Michael?) so you shouldn't have to worry about it during download. --scott -- ( http://cscott.net/ ) _______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel