W3C home > Mailing lists > Public > ietf-http-wg@w3.org > January to March 2013

Re: bohe and delta experimentation...

From: Mark Nottingham <mnot@mnot.net>
Date: Thu, 17 Jan 2013 10:39:53 +1100
Cc: James M Snell <jasnell@gmail.com>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Message-Id: <0A36AEB6-09B9-462F-B2E8-90B67FE69980@mnot.net>
To: Nico Williams <nico@cryptonector.com>
On 17/01/2013, at 10:35 AM, Nico Williams <nico@cryptonector.com> wrote:

>>> WRT years up to 9999 -- yes. The method I used consumes an extra byte after 2106... and then another in 4147. However, just one more byte buys up to 36812!
> 
> If we use seconds since epoch, set a new epoch, use a variable length
> integer encoding for seconds since epoch, we get to 32 bits for a few
> decades.  Four bytes.
> 
> If we use Julian days, set a new epoch, use a variable length integer
> encoding for julian day then we can get down to 13-14 bits to start.
> Add 12 bits for seconds, or multiply days by 3600 and add seconds and
> we're under 32 bits -- almost as low as 24, but still 4 bytes.  Can't
> get much better.


Yep, but you either need to make the epoch start at least a few years ago (old Last-Modified times, is important for heuristic freshness), OR keep it signed (losing a bit).

And I think you need more than 12 bits for seconds in a day...

--
Mark Nottingham   http://www.mnot.net/
Received on Wednesday, 16 January 2013 23:40:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 16 January 2013 23:40:23 GMT