[Issue 13160] New: ZipArchive.directory do not support read files with more than 65000 entries
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Jul 19 05:47:15 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13160
Issue ID: 13160
Summary: ZipArchive.directory do not support read files with
more than 65000 entries
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: Phobos
Assignee: nobody at puremagic.com
Reporter: mingodad at gmail.com
Reading a post on D language forum I saw an answer with a snippet to read big
zip files using memory mapped files, when I tried it with a zip file with more
than 65000 entries it fails with:
----
std.zip.ZipException at ../../../../src/libphobos/src/std/zip.d(49): ZipException:
invalid directory entry 3
----------------
./zipTest() [0x403aca]
./zipTest() [0x41486f]
./zipTest() [0x414fcf]
./zipTest() [0x415200]
./zipTest() [0x414fcf]
./zipTest() [0x415168]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f5c4e90e76d]
./zipTest() [0x4038b9]
----------------
======
import std.stdio, std.zip, std.file, std.mmfile;
int main()
{
auto mmfile = new MmFile(File("more-than-65000-entries.zip", "rb"));
auto zip = new ZipArchive(mmfile[]);
foreach (item; zip.directory) {
writeln("processing ", item.name, " ...");
// processing item...
}
return 0;
}
======
--
More information about the Digitalmars-d-bugs
mailing list