pub unsafe extern "C" fn JxlDecoderSetBoxBuffer(
    dec: *mut JxlDecoder,
    data: *mut u8,
    size: usize
) -> JxlDecoderStatus
Expand description

Sets output buffer for box output codestream.

The data is owned by the caller and may be used by the decoder until @ref 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 @ref JxlDecoderReleaseBoxBuffer, bytes that the decoder has already output should not be included, only the remaining bytes output must be set.

The @ref JxlDecoderReleaseBoxBuffer must be used at the next @ref JXL_DEC_BOX event or final @ref JXL_DEC_SUCCESS event to compute the size of the output box bytes.

@param dec decoder object @param data pointer to next bytes to write to @param size amount of bytes available starting from data @return @ref JXL_DEC_ERROR if output buffer was already set and @ref JxlDecoderReleaseBoxBuffer was not called on it, @ref JXL_DEC_SUCCESS otherwise