Costanzo Ferraro
Costanzo Ferraro

Reputation: 179

Open a gz file using Minizip Library

I'm trying to open a gz file with Minizip library (built on zlib).

Here is the code:

......
......

unzFile uf = unzOpen("MyFile.gz");

......

But Visual Studio 2013 crashes with this message:

Debug Assertion Failed! file open.c line 98

Expression: ("Invalid file open mode",0)

What could it mean?

Upvotes: 0

Views: 449

Answers (1)

Droppy
Droppy

Reputation: 9721

A .gz file is a single file that's been compressed.

A .zip file is a compressed archive; i.e. a hierarchical structure of compressed files.

tl;dr minizip doesn't support .gz files as it's not a .zip file.

Upvotes: 1

Related Questions