79535062

Date: 2025-03-25 23:27:01
Score: 0.5
Natty:
Report link

For compressing files, I would suggest setting both ZipEntry.Size = 0 and ZipEntry.CompressedSize = 0 after creating the ZipEntry with the ZipEntryFactory. I have found that sometimes neither or just one property is set to zero for a factory-generated file entry and I have never had a problem when I set them both to zero explicitly. I suppose this could mess things up if you rely upon ZipEntry.Size for something before the entry is added to the Zipfile, but in that case you could always get the file size from the uncompressed file. Once the entry has been added to the Zipfile, if you retrieve the entry it's compressed size will be correct. I agree with Shingo, it seems like a bug. Minor as bugs go, and it isn't worth complaining about in a free library.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: David Eisenbeisz