On 3/25/07, Shawn O. Pearce <spearce@xxxxxxxxxxx> wrote:
Peter Eriksen <s022018@xxxxxxxxxxxxxx> wrote: > On Sat, Mar 24, 2007 at 07:24:17PM -0400, Nicolas Pitre wrote: > > On Sat, 24 Mar 2007, Peter Eriksen wrote: > > > > The uncompressed file name table contains NR_ENTRIES entries, > and looks like this: > > +------------+------+--------------+------+--------------------+---- > | NR_ENTRIES | MODE | Full path 1 | MODE | Full path 2 | ... > +------------+------+--------------+------+--------------------+---- > 4 bytes 2 bytes n1 bytes 2 bytes n2 bytes > > MODE is a network-byte-order integer representing the mode of the path, > and the path is a variable length, null-terminated string. Yes so far.
Perhaps has been already evaluated and my comment is not pertinent but, anyway... Experimenting with file names cache in qgit I have found a big saving splitting the paths in base name and file name and indexing both: drivers\usb\host\ehci.h drivers\usb\host\ehci-pci.c drivers\usb\host\ohci-pci.c kernel\sched.c became: dir names table 0 drivers\usb\host 1 kernel file name table 0 ehci.h 1 ehci-pci.c 2 ohci-pci.c In this way a big saving is achieved in case of directories deep in the tree (long paths) and a lot of files. Also after compressing the difference is noticeable. Regarding MODE field an observation could be that is almost always the same, so an idea could be to store a 'default mode' just after nr_entries and do not add the field any more except in case path mode is different from default mode. In case this could bring to unaligned entries another idea could be to store _all_ mode fields at the beginning (or at the end and let deflate to remove almost everything more easily) Marco - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html