[Declared in "../apps/kdu_server/kdu_serve.h"]
This structure manages a contiguous chunk of memory into which a whole number of data tranfer messages are packed by the kdu_serve::generate_increments function. In some cases, the chunk may be identified with a single network packet, but applications and communication protocols may assign any desired interpretation.
For more information, see the kdu_serve::generate_increments function.
Maximum number of bytes which can be recorded in the data array, including prefix_bytes. The value of the num_bytes member is bounded by max_bytes. The value of max_bytes must not be modified by applications, but it may be accessed to determine the legal range of indices which may be applied to the data array.
This member indicates the number of initial bytes in the data buffer which have been reserved by the application. The compressed data is stored in the remaining num_bytes- prefix_bytes elements of the array. The number of prefix bytes to be reserved in each chunk is configured in the call to kdu_serve::initialize.
This member indicates the total number of valid bytes in the data buffer, including the initial prefix_bytes reserved for use by the application.
Buffer used to store chunk data. The first prefix_bytes are reserved for use by the application. The total number of valid bytes in the buffer, including the prefix bytes and all bytes written by the kdu_serve::generate_increments function is num_bytes.
Note that the data pointer is guaranteed to be aligned on an 8-byte boundary. In practice, it will probably point into the same block of memory which is allocated to hold the kds_chunk structure.
This member is used by the kdu_serve::release_chunks function if its check_abandoned argument is set to true. See the comments appearing with that function for an explanation.
Used to build a linked list of chunks.