reading/writing an archive causes data loss; std.zip horribly broken

Consider, if you will, the following source. import std.zip, std.file; void main() { auto arch = new ZipArchive; auto test = new ArchiveMember; test.name = "foob"; test.expandedData = [cast(ubyte) 2, 3, 4, 5]; arch.addMember(test); auto data = arch.build; write("test.zip", data); auto arch2 = new ZipArchive(data); // arch2.expand(arch2.directory["foob"]); // this fixes it auto data2 = arch2.build; write("test2.zip", data2); // test2.zip contains a single file, "foob", zero bytes. It's horribly empty in there. } It seems when Phobos builds the archive data without decompressing in-between, it doesn't consider the already existing compressed data to be of any particular relevance and just recompresses the (empty) uncompressed data. This bug just cost me two days of work. Glee! --feep