The following zip, crafted using https://en.wikipedia.org/wiki/ZIP_(file_format)#Data_descriptor fails CRC checks although valid and unzippable by the OS. This zip should be usable as a future test case as it mirrors your other good_crc zip [good_crc_trailing_data_descriptor.zip](https://github.com/user-attachments/files/17035621/good_crc_trailing_data_descriptor.zip) ``` it("Good CRC - trailing data descriptor ", (done) => { const goodZip = new Zip(path.join(__dirname, "good_crc_trailing_data_descriptor.zip")); const entries = goodZip.getEntries(); assert(entries.length === 1, "Good CRC: Test archive contains exactly 1 file"); const testFile = entries.filter(function (entry) { return entry.entryName === "lorem_ipsum.txt"; }); assert(testFile.length === 1, "Good CRC: lorem_ipsum.txt file exists as archive entry"); const testFileEntryName = testFile[0].entryName; goodZip.readAsTextAsync(testFileEntryName, function (data, err) { assert(!err, "Good CRC: error object not present"); assert(data && data.length, "Good CRC: buffer not empty"); done(); }); }); ```
Activity