[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Accessibility of official jigdo files for Sarge



On Thu, Jul 31, 2003 at 09:26:52PM +0200, Richard Atterer wrote:
> Hm, is this feature also somehow available in the Debian zlib packages? 
> jigdo-file uses zlib to compress the .template files...

Hm, it just occurred to me that it might be possible for me to allow
rsyncability for .template files even without a patched zlib!

The gzip patch works by calculating a rolling checksum for the last n bytes
of the _un_compressed data. Whenever the checksum reaches a magic value
(0), the compress stream is flushed. This ensures that the flushing always
takes place at the same positions, just after the same data patterns.

With my knowledge about the .template files, I can do a similar (possibly
even better) thing: The compressed part of the .template consists of chunks
of image data which were not matched by any .deb in the Debian mirror.
Flushing between writing those chunks will do the trick.

To prevent this from affecting the compression ratio too much, it mustn't
happen too often, but current versions of jigdo-file already flush the
stream from time to time for other reasons, so it should be possible to
just move the "boundary" of the flush in an rsync-friendly way.

Cheers,

  Richard

-- 
  __   _
  |_) /|  Richard Atterer     |  GnuPG key:
  | \/¯|  http://atterer.net  |  0x888354F7
  ¯ '` ¯



Reply to: