archive
archive copied to clipboard
Make correct docx after working with it as zip archive?
http://stackoverflow.com/questions/29593676/how-to-make-correct-docx-after-working-with-it-as-zip-archive
it's look like crc after adding files to archive are not updates.
CRCs are being recomputed from an initial value of 0.
After some research it seems it needs to use a different initial value.
I'll try to get this fixed up today.
The crc is recalculated automatically when the data is set into the file object. See https://github.com/rcythr/archive/blob/master/source/archive/zip.d#L185
After doing some digging I have determined that the call to std.zlib.crc32 is being called correctly as-is -- at least it's being called in the same way that python's zip module is calling their crc function.
When I wrote this module none of my archival tools complained about invalid crc values. If you discover the root of this problem please feel free to let me know or write a patch for it.