MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / gzflush

Function gzflush

extern/zlib/src/gzwrite.c:528–554  ·  view source on GitHub ↗

-- see zlib.h -- */

Source from the content-addressed store, hash-verified

526
527/* -- see zlib.h -- */
528int ZEXPORT gzflush(gzFile file, int flush) {
529 gz_statep state;
530
531 /* get internal structure */
532 if (file == NULL)
533 return Z_STREAM_ERROR;
534 state = (gz_statep)file;
535
536 /* check that we're writing and that there's no error */
537 if (state->mode != GZ_WRITE || state->err != Z_OK)
538 return Z_STREAM_ERROR;
539
540 /* check flush parameter */
541 if (flush < 0 || flush > Z_FINISH)
542 return Z_STREAM_ERROR;
543
544 /* check for seek request */
545 if (state->seek) {
546 state->seek = 0;
547 if (gz_zero(state, state->skip) == -1)
548 return state->err;
549 }
550
551 /* compress remaining data with requested flush */
552 (void)gz_comp(state, flush);
553 return state->err;
554}
555
556/* -- see zlib.h -- */
557int ZEXPORT gzsetparams(gzFile file, int level, int strategy) {

Callers

nothing calls this directly

Calls 2

gz_zeroFunction · 0.85
gz_compFunction · 0.85

Tested by

no test coverage detected