std.zip

AndyC via Digitalmars-d digitalmars-d at puremagic.com
Sun Jan 25 12:56:04 PST 2015


On Sunday, 25 January 2015 at 18:40:54 UTC, ketmar wrote:
> On Sun, 25 Jan 2015 16:02:33 +0000, AndyC wrote:
>
>> I was looking at this bug report:
>> 
>> https://issues.dlang.org/show_bug.cgi?id=2138
>> 
>> and sure enough it doesn't handle zipfiles with more than 65K 
>> files.
>> 
>> and I checked the code and its pretty limited on what it will 
>> even read.
>> 
>> Which got me to wondering, why reinvent the wheel?  Can 
>> std.zip use
>> libzip instead of rewriting it?
>
> 'cause there is no libzip on windows by default, and there are 
> GNU/Linux,
> FreeBSD and other OSes where libzip can absent. making it 
> "required"
> dependency for dmd is not a very good move.
>
> and integrating more and more C libraries in dmd source tree is 
> not a
> good idea too.
>
> yet i found std.zip handy sometimes, so i'm happy that we have 
> it in
> Phobos.

Its handy, yes, until you hit one of its many limitations, then 
what will you do?

Which is less work:
1) include libzip in the install as a requirement, and write a D 
interface for it.
2) reimplement all of it in D?

I don't honestly know.

More C libraries means D is more useful faster and with less 
bugs.  Seems like a win to me.

-Andy


More information about the Digitalmars-d mailing list