jagtesh / miniz

Automatically exported from code.google.com/p/miniz
0 stars 0 forks source link

the zip file created by example3 that is not decompressed by winzip/winrar/7zip? #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.using example3 to compress the *.txt to *.zip
2.and then decompress *.zip by using winzip/winrar/7zip
3.fail

What is the expected output? What do you see instead?

can decompress by other software
What version of the product are you using? On what operating system?
 miniz.c v1.14 , windows xp

Please provide any additional information below.

Original issue reported on code.google.com by yand...@gmail.com on 7 Aug 2013 at 8:39

GoogleCodeExporter commented 9 years ago
Hi yand,
example3 doesn't compress to .zip files, it outputs raw zlib-style streams 
which can't be opened by WinZip/WinRAR/7zip (as far as I know) because zlib 
streams aren't archives. example2 outputs a test .zip file with a bunch of text 
files that can be opened by KDE Dolphin, WinZip, 7zip, etc.

Original comment by richge...@gmail.com on 7 Aug 2013 at 9:32

GoogleCodeExporter commented 9 years ago
hi,richge
thanks for your reply. another question,i want to know how to modify source 
miniz.c to make it support compress the folder.
BTW,can you give some information about the compress alogorithm?(such as 
function tdefl_compress_normal),it is diffcult to understand your alogrithm by 
miniz.c

Original comment by yand...@gmail.com on 15 Aug 2013 at 8:41

GoogleCodeExporter commented 9 years ago
Hi yand789, 
The algorithm is described here:
http://en.wikipedia.org/wiki/DEFLATE
Also Google for "RFC 1950".
To compress a folder, you would need to find the files somehow (using 
FindFiles() under Win32, etc.) and compress each file individually using miniz. 
miniz.c itself only handles the low-level stuff.
Regards,
-Rich

Original comment by richge...@gmail.com on 13 Oct 2013 at 5:30