a pointer in to the corresponding packfile.
"""
+from collections import defaultdict
import hashlib
import mmap
import os
f.write(data)
entries = sort(entries, cmp=cmp_entry)
f = open(filename, 'w')
+ fan_out_table = defaultdict(lambda: 0)
+ for (offset, name) in entries:
+ fan_out_table[name[0]] += 1
# Fan-out table
for i in range(0x100):
- write(struct.pack(">L", 0))
+ write(struct.pack(">L", fan_out_table[i]))
for (offset, name) in entries:
write(struct.pack(">L20s", offset, name))
f.write(sha1.digest())