16 Nov
2005
16 Nov
'05
4:03 p.m.
When I use this little test program, taken from the zlib examples. WinRar doesn't have any problem opening it. The generated file "chh.gz" is 26 bytes. int main() { gzFile file; file = gzopen( "chh.gz", "wb"); gzputc(file, 'h'); gzputs(file, "ello" ); gzseek(file, 1L, SEEK_CUR); /* add one zero byte */ gzclose(file); return 0; } Using the iostreams I think, and I might be wrong, should generate the same file using this test program: int main() { io::filtering_ostream out; out.push( io::zlib_compressor() ); out.push( io::file_sink( "chh.gz", std::ios::binary )); out << "hello"; return 0; } Here the file is 13 bytes. So I guess the header or footer is wrong. Greets, Christian