dmi_encoder_put_bytes

Synopsis

#include <opendmi/encoder.h>

bool dmi_encoder_put_bytes(dmi_encoder_t *encoder, const void *ptr,
                           size_t length);

Description

The dmi_encoder_put_bytes function writes length bytes at ptr at the current position.

The position in the source data advances by the same number of bytes, so that the two stay in step, as long as there are bytes left in it.

Parameters

encoder

Encoder to write to.

ptr

Bytes to write.

length

Number of the bytes.

Return value

true on success, false otherwise.

Errors

DMI_ERROR_ARGUMENT_NULL

ptr is nullptr, while length is not zero.

DMI_ERROR_OUT_OF_MEMORY

Buffer of the writer cannot grow.