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

Re: Compression and dictionaries

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 14, 2006, 14:45 UTC
Message-ID
<Pine.LNX.4.63.0608141641330.28360@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<9e4733910608140708i45e3d6day6b87676783fd6511@mail.gmail.com>
Hi,
On Mon, 14 Aug 2006, Jon Smirl wrote:
> Does a zlib dictionary just changes the probabilities in the histogram 
> or does it turn the dictionary into a pre-loaded encoding tree?

I have to admit that I do not know zlib well enough to tell off the top of my head, but I guess it would make more sense to have it as a preloaded encoding tree.

Show 9 quoted lines
> The other compression schemes I looked at let you load in a
> precomputed huffman/arithmetic encoding tree. By preloading an
> encoding tree you avoid storing the encoding of "void => 010101' in
> every  item. Removing 1M encoding maps and using one common one should
> be a win. Items not in the map would still be stored using internal
> additions to the map.
> 
> Changing the probabilities probably won't help much, but there may be
> good gains from partially eliminating 1M encoding maps.

I _think_ that it would not matter much. The deltas have a more important impact.

> > Further, if the pack-file becomes corrupt, you usually still have the 
> > pack index, or the start of the pack-file, and can reconstruct most of 
> > the objects. If you use a dictionary, and just one bit flips in it, 
> > you're screwed.

I still think that this is important to think through: Is it worth a couple of kilobytes (I doubt that it would be as much as 1MB in _total_), and be on the unsafe side?

Ciao, Dscho

Previous: Jon SmirlNext: Jon Smirl
Message 9 of 20 in “Compression and dictionaries”
  1. Jon SmirlAug 14, 2006
  2. Shawn PearceAug 14, 2006
  3. Jon SmirlAug 14, 2006
  4. Shawn PearceAug 14, 2006
  5. Alex RiesenAug 14, 2006
  6. Erik MouwAug 14, 2006
  7. Johannes SchindelinAug 14, 2006
  8. Jon SmirlAug 14, 2006
  9. Johannes SchindelinAug 14, 2006
  10. Jon SmirlAug 14, 2006
  11. David LangAug 14, 2006
  12. Jakub NarebskiAug 14, 2006
  13. Jeff GarzikAug 14, 2006
  14. David LangAug 14, 2006
  15. Jeff GarzikAug 14, 2006
  16. Jon SmirlAug 14, 2006
  17. David LangAug 14, 2006
  18. Johannes SchindelinAug 14, 2006
  19. Alex RiesenAug 14, 2006
  20. Johannes SchindelinAug 14, 2006

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.