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

Re: tracking binary files

From
Jeff King <peff@peff.net>
Date
Feb 19, 2009, 03:52 UTC
Message-ID
<20090219035219.GB19862@coredump.intra.peff.net>
In-Reply-To
<20090219031602.GD20416@b2j>
On Thu, Feb 19, 2009 at 11:16:02AM +0800, bill lam wrote:
> I would like to use git to track some database files of sizes from 1MB
> to 50MB.  I want to know does git compress them for storage or not.
Yes, git will compress them via zlib.
> If so, what will be the expected compression ratio.  Those files
> normally compressed to 25% of original size using zip.

Then I would expect the same ratio, since I believe zip and zlib both use the "deflate" algorithm.

Note, however, that git will also do delta compression between versions. So storing N versions of a file should be no _worse_ than zipping and keeping those N versions. But if the database files have small enough changes from version to version (which depends on the database format, and how much the on-disk structure changes for each update) then it will compress even more.

-Peff
Previous: bill lam
Message 2 of 2 in “tracking binary files”
  1. bill lamFeb 19, 2009
  2. Jeff KingFeb 19, 2009

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.