librsync
2.3.2
|
Description of input and output buffers. More...
Data Fields | |
char * | next_in |
Next input byte. More... | |
size_t | avail_in |
Number of bytes available at next_in. More... | |
int | eof_in |
True if there is no more data after this. More... | |
char * | next_out |
Next output byte should be put there. More... | |
size_t | avail_out |
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.
Definition at line 322 of file librsync.h.
char* rs_buffers_s::next_in |
Next input byte.
References a pointer which on entry should point to the start of the data to be encoded. Updated to point to the byte after the last one consumed.
Definition at line 328 of file librsync.h.
size_t rs_buffers_s::avail_in |
Number of bytes available at next_in.
References the length of available input. Updated to be the number of unused data bytes, which will be zero if all the input was consumed. May be zero if there is no new input, but the caller just wants to drain output.
Definition at line 336 of file librsync.h.
int rs_buffers_s::eof_in |
True if there is no more data after this.
Definition at line 339 of file librsync.h.
char* rs_buffers_s::next_out |
Next output byte should be put there.
References a pointer which on entry points to the start of the output buffer. Updated to point to the byte after the last one filled.
Definition at line 345 of file librsync.h.
size_t rs_buffers_s::avail_out |
Remaining free space at next_out.
References the size of available output buffer. Updated to the size of unused output buffer.
Definition at line 351 of file librsync.h.