[tz] Looking for a way to cut down binary zoneinfo size. Does anyone have the way to?

Arthur David Olson arthurdavidolson at gmail.com
Thu May 18 17:29:19 UTC 2017


Cutting out old data may not buy as much as you'd like. Putting a "timecnt
= 0" at the top of "writezone" in "zic.c" and then comparing the produced
directories of the original ("tzraw") and modified ("tzcooked") yields:

    Script started on Thu, May 18, 2017  1:12:37 PM
    $ du -s tzraw/tmp/etc tzcooked/tmp/etc
    3103    tzraw/tmp/etc
    2356    tzcooked/tmp/etc
    $ exit
    exit
    Script done on Thu, May 18, 2017  1:12:49 PM

Limited savings is due to disk sector size; as an example, the
"America/New_York" produced by an unmodified zic weighs in at 3545 bytes;
on a 4096-byte-sector system, the one sector it takes can't be reduced.

(Your correspondent is enough of a fossil to have lived in the age of
512-byte sectors.)

If space is at a premium, be sure to "make REDO=posix_only ..." when
building.

    @dashdashado


On Thu, May 18, 2017 at 12:16 PM, Viktor Sergiienko <singalen at gmail.com>
wrote:

> Hello,
>
> I'm developing for a pretty small-sized embedded system, and 2.9M of
> binaries is a bit too much for us.
> The system never uses a date before 2007.
>
> I estimate I can slim it down too 500K by cutting down the old data.
>
> 1. I made a script to cut down the source data: all the rules and all
> the zonelines before 2001.
> Compiling this data, I get a lot of errors like:
>
> > "northamerica", line 2537: %s in ruleless zone
> > "northamerica", line 2618: unruly zone
>
> because some zones are left without rules, but with %s format in them.
>
> 2. I tried to modify zic itself, but apparently understanding it will
> take me days.
> Just setting min_year to 2001 results in bunch of
>
> > can't determine time zone abbreviation to use just after until time
>
> Does anyone have a ready solution?
> Thanks!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mm.icann.org/pipermail/tz/attachments/20170518/ec77e9a5/attachment-0001.html>


More information about the tz mailing list