Description of input and output buffers. More...
|Next input byte. More...|
|Number of bytes available at next_in References the length of available input. More...|
|True if there is no more data after this. More...|
|Next output byte should be put there References a pointer which on entry points to the start of the output buffer. More...|
|Remaining free space at next_out. More...|
Description of input and output buffers.
On each call to rs_job_iter(), the caller can make available
Buffers must be allocated and passed in by the caller.
On input, the buffers structure must contain the address and length of the input and output buffers. The library updates these values to indicate the amount of remaining buffer. So, on return, avail_out is not the amount of output data produced, but rather the amount of output buffer space still available.
This means that the values on return are consistent with the values on entry, and suitable to be passed in on a second call, but they don't directly tell you how much output data was produced.
Note also that if *avail_in is nonzero on return, then not all of the input data has been consumed. The caller should either provide more output buffer space and call rs_job_iter() again passing the same next_in and avail_in, or put the remaining input data into some persistent buffer and call rs_job_iter() with it again when there is more output space.