=========================================================================== * Update the compression level and strategy */
(file, level, strategy)
| 237 | * Update the compression level and strategy |
| 238 | */ |
| 239 | int ZEXPORT gzsetparams (file, level, strategy) |
| 240 | gzFile file; |
| 241 | int level; |
| 242 | int strategy; |
| 243 | { |
| 244 | gz_stream *s = (gz_stream*)file; |
| 245 | |
| 246 | if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR; |
| 247 | |
| 248 | /* Make room to allow flushing */ |
| 249 | if (s->stream.avail_out == 0) { |
| 250 | |
| 251 | s->stream.next_out = s->outbuf; |
| 252 | if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) { |
| 253 | s->z_err = Z_ERRNO; |
| 254 | } |
| 255 | s->stream.avail_out = Z_BUFSIZE; |
| 256 | } |
| 257 | |
| 258 | return deflateParams (&(s->stream), level, strategy); |
| 259 | } |
| 260 | |
| 261 | /* =========================================================================== |
| 262 | Read a byte from a gz_stream; update next_in and avail_in. Return EOF |
nothing calls this directly
no test coverage detected