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

Re: Compression and dictionaries

From
Shawn Pearce <spearce@spearce.org>
Date
Aug 14, 2006, 04:17 UTC
Message-ID
<20060814041705.GD18667@spearce.org>
In-Reply-To
<9e4733910608132107j7bca0271g360de3447febbf51@mail.gmail.com>
Jon Smirl <jonsmirl@gmail.com> wrote:
Show 5 quoted lines
> The zlib doc says to put your most common strings into the fixed
> dictionary. If a string isn't in the fixed dictionary it will get
> handled with an internal dictionary entry.  By default zlib runs with
> an empty fixed dictionary and handles everything with the internal
> dictionary.
> Since we are encoding C many strings will always be present (if,
> static, define, const, char, include, int, void, while, continue,
> etc).  Do you have any tools to identify the top 500 strings in C
> code? The fixed dictionary would get hardcoded into the git apps.

Actually GIT itself may also benefit from other strings beyond those common found in C-like languages:

	'10644 '
	'40000 '
	'parent '
	'tree '
	'author '
	'committer '
as these occur frequently in trees and commits.
 
> A fixed dictionary could conceivably take 5-10% off the size of each entry.

Could be an interesting experiment to see if that's really true for common loads (e.g. the kernel repo). I don't think anyone has tried it.

-- 
Shawn.
Previous: Jon SmirlNext: Alex Riesen
Message 4 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.