MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / gzflush

Function gzflush

extlibs/minizip/src/gzwrite.c:594–625  ·  view source on GitHub ↗

-- see zlib.h -- */

(file, flush)

Source from the content-addressed store, hash-verified

592
593/* -- see zlib.h -- */
594int ZEXPORT gzflush(file, flush)
595gzFile file;
596
597int flush;
598{
599 gz_statep state;
600
601 /* get internal structure */
602 if (file == NULL)
603 return Z_STREAM_ERROR;
604 state = (gz_statep)file;
605
606 /* check that we're writing and that there's no error */
607 if (state->mode != GZ_WRITE || state->err != Z_OK)
608 return Z_STREAM_ERROR;
609
610 /* check flush parameter */
611 if (flush < 0 || flush > Z_FINISH)
612 return Z_STREAM_ERROR;
613
614 /* check for seek request */
615 if (state->seek)
616 {
617 state->seek = 0;
618 if (gz_zero(state, state->skip) == -1)
619 return state->err;
620 }
621
622 /* compress remaining data with requested flush */
623 (void)gz_comp(state, flush);
624 return state->err;
625}
626
627/* -- see zlib.h -- */
628int ZEXPORT gzsetparams(file, level, strategy)

Callers

nothing calls this directly

Calls 2

gz_zeroFunction · 0.85
gz_compFunction · 0.85

Tested by

no test coverage detected