Re: [PATCH] reduce delta head inflated size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 19 Oct 2006, Morten Welinder wrote:

> On 10/18/06, Nicolas Pitre <nico@xxxxxxx> wrote:
> > Supposing that both the base and result sizes were both full size 64-bit
> > values, their encoding would occupy only 9.2 bytes each.  Therefore
> > inflating 64 bytes is way overkill.  Limit it to 20 bytes instead which
> > should be plenty enough for a couple years to come.
> 
> 2^63 ~ 9.2e18
> 
> Thus one signed 64-bit number can take up 1 sign + 19 digits + 1 nul.
> That's 21 bytes.

No.  In this case the value is kept binary, with bits spread over 
consecutive bytes but with the MSB indicating continuation on the next 
byte.

This means 64 bits / 7 bits per byte = 9.1 bytes, hence 10.  Then there 
are 2 of those values that makes 20 bytes.


Nicolas
-
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]