geromueller / zstream-cpp

C++ zip stream wrapper
43 stars 5 forks source link

When compression level 0 is used, end of file is still compressed #3

Closed mdelambilly closed 1 year ago

mdelambilly commented 3 years ago

with this source code : int main(void) { ofstream os("test.txt.gz"); ogzstream gz(os, 0); for (size_t i = 0; i < 2000; i++) { gz << drand48() << endl; } cout << gz.get_zerr() << endl; return 0; }

end of file looks like : 0.458663 0.590483 0.180235 i▒▒kF

geromueller commented 1 year ago

Hi, sorry for the late reply! This is intended, since the file needs to be a valid gzip file.