May 07, 2016
On 5/7/16 3:33 PM, Andrei Alexandrescu wrote:
> Another library discussed as even more ripe for replacement is zlib:
> * We compile the C source code, which is extra aggravation to the build scripts
> * The D wrappers are ancient and clunky - we should have beautiful, efficient > range streaming
> * I think the license allows us to translate the source code to D, so we have > a viable path of replacement
> * Just got word (thx Rikki) the D wrappers use GC in a laissez-faire manner, > so no way to use the library tightly
>
> So if anyone wants to look into this, it would be a good project.

Before anyone gets too deep into this, the zip file format is functionally the same as the various .lib and .a formats read and written by dmd, and there are many other such formats.

Any redesign should be a package based one, such as:

    std.archiver.zip
    std.archiver.libomf
    std.archiver.libmscoff
    std.archiver.libmach
    std.archiver.libelf

    (those are just the ones we have code for)

and they should use a common interface.
May 08, 2016
On 08/05/2016 3:08 PM, Walter Bright wrote:
> On 5/7/16 3:33 PM, Andrei Alexandrescu wrote:
>> Another library discussed as even more ripe for replacement is zlib:
>> * We compile the C source code, which is extra aggravation to the
> build scripts
>> * The D wrappers are ancient and clunky - we should have beautiful,
> efficient > range streaming
>> * I think the license allows us to translate the source code to D, so
> we have > a viable path of replacement
>> * Just got word (thx Rikki) the D wrappers use GC in a laissez-faire
> manner, > so no way to use the library tightly
>>
>> So if anyone wants to look into this, it would be a good project.
>
> Before anyone gets too deep into this, the zip file format is
> functionally the same as the various .lib and .a formats read and
> written by dmd, and there are many other such formats.
>
> Any redesign should be a package based one, such as:
>
>     std.archiver.zip
>     std.archiver.libomf
>     std.archiver.libmscoff
>     std.archiver.libmach
>     std.archiver.libelf
>
>     (those are just the ones we have code for)
>
> and they should use a common interface.

Assuming it uses allocators, I'd be happy.

Although I like the idea of replacing what is in dmd with this.
But perhaps for the binary formats derivation that they should be fully import/exportable with headers and all? It would step 1 of making a linker.