From: Jon Smirl Date: Sat, 21 Apr 2007 17:59:24 GMT Subject: Re: Why SHA are 40 bytes? (aka looking for flames) Message-ID: <9e4733910704211059h16c06e11k967d0bdd3e4970fc@mail.gmail.com> In-Reply-To: On 4/21/07, Marco Costalba wrote: > On 4/21/07, Jon Smirl wrote: > > On 4/21/07, Marco Costalba wrote: > > > Well, why to store always the full length SHA? > > > > When Shawn gets done with full compression the SHAs would get stored > > in the packfile once and then be replaced with a token generated from > > the compression algorithm. Compression tokens are designed to use the > > minimal number of bits depending on frequency of occurrence. > > > > Currently in Lunux tree there are about 445.424 objects (git > count-objects -v), if each object has his 40 bytes name it is about > 20MB to store sha *once*, probably with no real disambiguate need to > be that much. You have to store the full SHAs at least once since they are the signature against data corruption. > Marco > -- Jon Smirl jonsmirl@gmail.com