c - zlib writing raw encoded stream -
i'm trying write generic function write both uncompressed , compressed file (depending on user input). according zlib, have set gzopen mode "w0" (no compression), still zlib header!
in zlib manual mentions possible write raw data (no header/trailer) doesn't how. how can write plain (raw encoded) file zlib?
thanks,
open file using transparent mode "t":
#include <zlib.h> int main() { gzfile file = gzopen("/tmp/a.dat", "wt"); (void) gzwrite(file, "test", 4); (void) gzclose(file); }
Comments
Post a Comment