mz_inflate function
- @Native<Int Function(mz_streamp, Int)>(mz_streamp, ffi.Int)>()
- mz_streamp pStream,
- int flush
Decompresses the input stream to the output, consuming only as much of the input as needed, and writing as much to the output as possible. / / Parameters: / / pStream is the stream to read from and write to. You must initialize/update the next_in, avail_in, next_out, and avail_out members. / / flush may be MZ_NO_FLUSH, MZ_SYNC_FLUSH, or MZ_FINISH. / / On the first call, if flush is MZ_FINISH it's assumed the input and output buffers are both sized large enough to decompress the entire stream in a single call (this is slightly faster). / / MZ_FINISH implies that there are no more source bytes available beside what's already in the input buffer, and that the output buffer is large enough to hold the rest of the decompressed data. / / Return values: / / MZ_OK on success. Either more input is needed but not available, and/or there's more output to be written but the output buffer is full. / / MZ_STREAM_END if all needed input has been consumed and all output bytes have been written. For zlib streams, the adler-32 of the decompressed data has also been verified. / / MZ_STREAM_ERROR if the stream is bogus. / / MZ_DATA_ERROR if the deflate stream is invalid. / / MZ_PARAM_ERROR if one of the parameters is invalid. / / MZ_BUF_ERROR if no forward progress is possible because the input buffer is empty but the inflater needs more input to continue, or if the output buffer is not large enough. Call mz_inflate() again / / with more input data, or with more room in the output buffer (except when using single call decompression, described above).
Implementation
@ffi.Native<ffi.Int Function(mz_streamp, ffi.Int)>()
external int mz_inflate(mz_streamp pStream, int flush);