Hello, I wrote a program to compress a file with gzip, which works fine. I also wrote a program to decompress the gzip file, which runs but outputs a blank file. Any help would be greatly appreciated as the documentation on zlib's gzip functions is scarce at best.
gzFile gin = gzopen(infile, "rb"); // <- you open the file here... and since you never advance
unsignedint size = gztell(gin); // the file pointer, it is still at 0. Which means size == 0
char* buffer = newchar[size]; // <- so your buffer is 0 bytes in size
gzread(gin, buffer, size); // <- and you'd read 0 bytes