dmi_encoder_copy

Synopsis

#include <opendmi/encoder.h>

bool dmi_encoder_copy(dmi_encoder_t *encoder, size_t length);

Description

The dmi_encoder_copy function writes length bytes the model does not hold at the current position: the ones the source data has there in the preserve mode, and zeros in the canonical one, or wherever the source data ends before them.

This is what the bits the specification reserves and the tails of the records longer than the fields they are known to hold are written with.

Parameters

encoder

Encoder to write to.

length

Number of the bytes.

Return value

true on success, false otherwise.

Errors

DMI_ERROR_OUT_OF_MEMORY

Buffer of the writer cannot grow.