git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git and OpenDocument (OpenOffice.org) files

From
SCSergio Callegari <scallegari@arces.unibo.it>
Date
Aug 27, 2007, 15:16 UTC
Message-ID
<loom.20070827T170518-603@post.gmane.org>
In-Reply-To
<20070827141600.GA11000@glandium.org>
Mike Hommey <mh <at> glandium.org> writes:
Show 6 quoted lines
> 
> A zipped file will be 100% different at each revision.
> The unzipped counterpart may be similar for 90% or more between revisions.
> 
> Mike
> 
In my (modest) experience, not really:

in fact, odf files are a zip collection of many individual files (for instance if you have an impress presentation, the zip collection will contain all the images that appear in the presentation...)

Now: zip is different from .tar.gz in that tar.gz first concatenates the
files and then compresses the overall thing, while zip compresses or stores
the individual files and then concatenates and indexes the result.

The difference is that in a tar.gz file, changing a single byte in one of the internal files can lead to a completely different compressed stream, while in a zip file, changing an internal file only affects the relevant part of the zipped file.

This means that:
- if you have an odf document containing lots of internal objects (e.g.
images) that do not change very much from version to version, git can make
very good deltas.
- conversely if you have an odf document whose size is dominated by proper
content, then git will not be able to make good deltas.

As an example, I am finding that impress presentations (dominated by images) can delta very well, while calc spreadsheets (dominated by content) do not.

Probably it could be nice to make a filter that takes an odf file and re-zips it so that the content.xml inner file is only stored, rather than deflated. Then this could be used with the git file filtering machinery.

Sergio
Previous: Mike HommeyNext: Johannes Schindelin
Message 10 of 12 in “Git and OpenDocument (OpenOffice.org) files”
  1. Matthieu MoyAug 27, 2007
  2. Junio C HamanoAug 27, 2007
  3. Matthieu MoyAug 27, 2007
  4. Mike HommeyAug 27, 2007
  5. Johannes SchindelinAug 27, 2007
  6. David KastrupAug 27, 2007
  7. Matthieu MoyAug 27, 2007
  8. Johannes SchindelinAug 27, 2007
  9. Mike HommeyAug 27, 2007
  10. Sergio CallegariAug 27, 2007
  11. Johannes SchindelinAug 27, 2007
  12. David KastrupAug 27, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.