[tz] [Patch] Make it slightly easier to parse tzdata

Brian Inglis Brian.Inglis at systematicsw.ab.ca
Sat Nov 1 18:43:21 UTC 2014


On 2014-10-31 15:12, Garrett Wollman wrote:
> <<On Fri, 31 Oct 2014 17:02:55 -0400, random832 at fastmail.us said:
>
>> On Fri, Oct 31, 2014, at 10:56, Ed Schouten wrote:
>>> Hi there,
>>>
>>> Right now I am experimenting with trying to integrate the tzdata
>>> dataset into an embedded setup where I am not able to use zic(8) +
>>> /usr/share/zoneinfo.
>
>> I'm not sure I understand why you can't use the zoneinfo files, built
>> elsewhere?
>
> Especially since, even if you have no filesystem, they can be compiled
> into your executable.  (And the compiled format is
> architecture-independent, so the same data files can be used on any
> platform.)
>
> It is really unfortunate that so many people insist on reinventing the
> wheel.

If space is a concern with all the sources using nearly 700KB and the
binaries nearly 800KB, you could take a leaf from the web services and
new media embedded systems areas, and use a compressed binary archive
of the directory structure for the binaries (a la .jar, .war, .epub)
and modify only the tz loader to use the required decompression code
to load only the single required time zone info.

This would require a tradeoff between the compiled sizes of the
decompressors on your platform and the compressed data:
  94K tz.tar.xz
132K tz.tar.bz
189K tz.tar.gz
471K tz.zip

If you decided to go this route, the tradeoffs you make would be interesting
tothis group/list and other embedded folks, and code changes to support
this would be useful for other embedded folks and projects such as tzdist.

-- 
Take care. Thanks, Brian Inglis


More information about the tz mailing list