Re: [PATCH] reduce delta head inflated size
- From
- Morten Welinder <mwelinder@gmail.com>
- Date
- Oct 19, 2006, 13:49 UTC
- Message-ID
- <118833cc0610190649o484afdc8lb871d4b3c5361166@mail.gmail.com>
- In-Reply-To
- <Pine.LNX.4.64.0610181541280.1971@xanadu.home>
On 10/18/06, Nicolas Pitre <nico@cam.org> 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.
If you don't like the constant, 4*sizeof(integer type) should work. (Assuming sizeof measures in bytes.)
M.