👷 Upgrade miniz to 2.1.0
This commit is contained in:
parent
cba048da4c
commit
380aa4457e
5 changed files with 174 additions and 69 deletions
|
@ -2,7 +2,6 @@
|
|||
// Public domain, May 15 2011, Rich Geldreich, richgel99@gmail.com. See "unlicense" statement at the end of tinfl.c.
|
||||
#include <stdio.h>
|
||||
#include "miniz.h"
|
||||
#include "miniz_zip.h"
|
||||
typedef unsigned char uint8;
|
||||
typedef unsigned short uint16;
|
||||
typedef unsigned int uint;
|
||||
|
@ -18,26 +17,6 @@ static const char *s_pStr = "Good morning Dr. Chandra. This is Hal. I am ready f
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
{
|
||||
mz_zip_archive zip_archive;
|
||||
memset(&zip_archive, 0, sizeof(zip_archive)); // mz_zip_archive contains a bunch of pointers. set all to nullptr
|
||||
mz_bool status = mz_zip_writer_init(&zip_archive, 0);
|
||||
if (!status)
|
||||
return;
|
||||
|
||||
status = mz_zip_writer_add_file(&zip_archive, "Images.zip", "Images/title.png", NULL, 0, MZ_DEFAULT_COMPRESSION);
|
||||
if (!status)
|
||||
return;
|
||||
|
||||
status = mz_zip_writer_finalize_archive(&zip_archive);
|
||||
if (!status)
|
||||
return;
|
||||
|
||||
status = mz_zip_writer_end(&zip_archive);
|
||||
if (!status)
|
||||
return;
|
||||
}
|
||||
|
||||
uint step = 0;
|
||||
int cmp_status;
|
||||
uLong src_len = (uLong)strlen(s_pStr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue