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

Re: Compression and dictionaries

From
Llinux@horizon.com <linux@horizon.com>
Date
Aug 17, 2006, 22:33 UTC
Message-ID
<20060817223303.1712.qmail@science.horizon.com>
In-Reply-To
<Pine.LNX.4.63.0608160832320.28360@wbgn013.biozentrum.uni-wuerzburg.de>

Just a note: there are index structures that support regular expression searching. In particular, a PAT tree, usually represented implicitly as a PAT array, can be walked by a finite automaton to find all the places it matches.

However, there's a lot of code complexity associated with that. And a PAT array assumes efficient random access to the text being indexed, as it does not keep a copy of the text.

Perhaps most importantly, this would be a big change to "git grep", as it would search every object in the database, not a particular commit. And mapping objects back to filenames in trees and commits requires another index.

Compression dictionaries and indexes have some opposing points. In a compression dictionary, you prefer common words that appear in many places. For an index, you prefer rare words that identify a small set of files.

Previous: Jon Smirl
Message 10 of 10 in “Re: Compression and dictionaries”
  1. linux@horizon.comAug 15, 2006
  2. Jon SmirlAug 15, 2006
  3. Jon SmirlAug 15, 2006
  4. linux@horizon.comAug 16, 2006
  5. Jon SmirlAug 16, 2006
  6. Johannes SchindelinAug 16, 2006
  7. Shawn PearceAug 16, 2006
  8. Johannes SchindelinAug 16, 2006
  9. Jon SmirlAug 16, 2006
  10. linux@horizon.comAug 17, 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.