Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a .zip file using zlib

Tags:

c

zip

zlib

I am reading through the document of zlib, and it is fairly detail. But I read upon this line:

The output data will be in the zlib format, which is different from the gzip or zip formats
http://www.zlib.net/zlib_how.html

It seems that zlib creates zlib format which is not the same as zip format as is discussed in this SO:

How are zlib, gzip and zip related? What do they have in common and how are they different?

Any body know whether it is possible to create zip format with zlib? and how?

like image 711
Yuchen Avatar asked Nov 03 '15 18:11

Yuchen


1 Answers

As @Jongware mentioned, you can find an example in the contrib/minizip folder of the source code library.

OR !

You can simply use libzip.

Possible duplicate: Simple way to unzip a .zip file using zlib

like image 164
Valentin Trinqué Avatar answered Oct 01 '22 19:10

Valentin Trinqué