pub unsafe extern "C-unwind" fn JxlDecoderSetBoxBuffer(
dec: *mut JxlDecoder,
data: *mut u8,
size: usize,
) -> JxlDecoderStatusExpand description
Sets output buffer for box output codestream.
The data is owned by the caller and may be used by the decoder until JxlDecoderReleaseBoxBuffer
is called or the decoder is destroyed or reset so must be kept alive until then.
If for the current box a box buffer was set before and released with JxlDecoderReleaseBoxBuffer,
bytes that the decoder has already output should not be included, only the remaining bytes output must be set.
The JxlDecoderReleaseBoxBuffer must be used at the next JxlDecoderStatus::Box event or final
JxlDecoderStatus::Success event to compute the size of the output box bytes.
§Parameters
dec: decoder objectdata: pointer to next bytes to write tosize: amount of bytes available starting from data
§Returns
JxlDecoderStatus::Errorif output buffer was already set andJxlDecoderReleaseBoxBufferwas not called on it,JxlDecoderStatus::Successotherwise