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

Function deflateEnd

extern/zlib/src/deflate.c:1258–1275  ·  view source on GitHub ↗

========================================================================= */

Source from the content-addressed store, hash-verified

1256
1257/* ========================================================================= */
1258int ZEXPORT deflateEnd(z_streamp strm) {
1259 int status;
1260
1261 if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
1262
1263 status = strm->state->status;
1264
1265 /* Deallocate in reverse order of allocations: */
1266 TRY_FREE(strm, strm->state->pending_buf);
1267 TRY_FREE(strm, strm->state->head);
1268 TRY_FREE(strm, strm->state->prev);
1269 TRY_FREE(strm, strm->state->window);
1270
1271 ZFREE(strm, strm->state);
1272 strm->state = Z_NULL;
1273
1274 return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;
1275}
1276
1277/* =========================================================================
1278 * Copy the source state to the destination state.

Callers 6

gzclose_wFunction · 0.85
compress2Function · 0.85
deflateInit2_Function · 0.85
deflateCopyFunction · 0.85
writePRTFunction · 0.85
~ZipStreambufCompressMethod · 0.85

Calls 1

deflateStateCheckFunction · 0.85

Tested by

no test coverage detected