Re: [fossil-users] ZIP files cannot be extracted using Archive Utility on Mac

2009-10-18 Thread D. Richard Hipp
On Oct 18, 2009, at 10:06 AM, Dmitry Chestnykh wrote: > Actually, there's a better way to do this -- if initialized using > > deflateInit2(&stream, Z_BEST_COMPRESSION, Z_DEFLATED, -MAX_WBITS, 8, > Z_DEFAULT_STRATEGY); > > then zlib produces correct deflate output for ZIP files -- we don't > need

Re: [fossil-users] ZIP files cannot be extracted using Archive Utility on Mac

2009-10-18 Thread Dmitry Chestnykh
Actually, there's a better way to do this -- if initialized using deflateInit2(&stream, Z_BEST_COMPRESSION, Z_DEFLATED, -MAX_WBITS, 8, Z_DEFAULT_STRATEGY); then zlib produces correct deflate output for ZIP files -- we don't need to skip 2 bytes at the beginning, and 4 bytes at the end. On 1

Re: [fossil-users] ZIP files cannot be extracted using Archive Utility on Mac

2009-10-18 Thread Dmitry Chestnykh
It seems I figured it out! zlib adds 4 bytes of Adler32 CRC to the end of the stream. If, like with the first 2 bytes of the stream, we skip it, then Archive Utility works, and Fossil produces the same ZIP file as zip utility. Most likely other compression utilities just ignore Adler32 (or m

Re: [fossil-users] ZIP files cannot be extracted using Archive Utility on Mac

2009-10-18 Thread D. Richard Hipp
On Oct 18, 2009, at 6:42 AM, Dmitry Chestnykh wrote: > Hello, > > Mac OS X's built-in Archive Utility (which is the default way to > extract archives by double-clicking them) > cannot extract ZIP files generated by Fossil. http://www.fossil-scm.org/fossil/tktview?name=923a912309 Curiously, the

Re: [fossil-users] ZIP files cannot be extracted using Archive Utility on Mac

2009-10-18 Thread Stephan Beal
On Sun, Oct 18, 2009 at 12:55 PM, Dmitry Chestnykh wrote: > * test-fossil.zip - made by `fossil test-filezip test-fossil.zip wiki.h` > * test-zip.zip - made by `zip -9 test-zip.zip wiki.h` > > In case anyone would like to compare them. i can open them on Linux (x86/32) using "Ark" and "File Rol

[fossil-users] ZIP files cannot be extracted using Archive Utility on Mac

2009-10-18 Thread Dmitry Chestnykh
Hello, Mac OS X's built-in Archive Utility (which is the default way to extract archives by double-clicking them) cannot extract ZIP files generated by Fossil. It shows "Error 1 - Operation Not Permitted". Command-line unzip utility can extract them. I'm tinkering with zip.c, but cannot gen