30 #include <zlib/zlib.h>
40 char options_string[16];
41 sprintf( options_string,
"w%s", comp);
68 m_file = (FILE*)fopen( name,
"wb" );
82 if (compressed_bytes == 0)
86 if (fwrite( &
m_buffer[0], 1u, compressed_bytes, (FILE*)
m_file ) < compressed_bytes)
124 if (compressed_bytes == 0)
128 if (fwrite( &
m_buffer[0], 1u, compressed_bytes, (FILE*)
m_file ) < compressed_bytes)
142 if (compressor == NULL || strcmp( compressor,
"" ) == 0)
144 else if (strcmp( compressor,
"gzip" ) == 0 || strcmp( compressor,
"gz" ) == 0)
146 else if (strcmp( compressor,
"lz4" ) == 0)
149 log_warning(stderr,
"unknown output file compressor \"%s\"\n", compressor );