[darcs-users] Darcs and binary files question

David Roundy droundy at abridgegame.org
Sat Jul 3 13:31:43 UTC 2004


On Fri, Jul 02, 2004 at 08:34:05PM -0700, David Brown wrote:
> On Fri, Jul 02, 2004 at 07:05:30PM -0700, Samuel A. Falvo II wrote:
> 
> > Maybe a better approach would be the use of a variation of LZ77 to 
> > produce a difference from old to new.  Of course, the goal isn't 
> > compression, but the compression scheme is predicated on finding 
> > differences and similarities between binary files.
> 
> The challenge from the darcs perspective is that the encoding needs to
> have several characteristics (correct me if I'm wrong, David):
> 
>   - reversible.
>   - commutable.
> 
> The reversible isn't that hard, but the commuting of differences is the
> challenging part.  Using file offsets instead of lines, and the existing
> darcs approach would probably work, though.

It only needs to be commutable if that is a desired feature.  For binary
files, it really isn't desired--you definitely don't want to "merge" two
different changes to a binary file.  So it just needs to be reversible.

Mostly, I haven't optimized the space use of binary files simply because
they don't seem particularly useful, and aren't very interesting (mostly
because they shouldn't commute).  I know that there are people who use
them, and I have one in the darcs repository (the logo, in PNG format).
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list