BloombergLP::bdldfp::DecimalConvertUtil::decimal64ToVariableWidthEncoding

Encode decimal in variable-width format into buffer.

Synopsis

Declared in <bdldfp_decimalconvertutil.h>

static
unsigned char*
decimal64ToVariableWidthEncoding(
    unsigned char* buffer,
    bdldfp::Decimal64 decimal);

Description

The behavior is undefined unless buffer points to a memory area with enough room to hold the encoded value (which has a maximum size of 9 bytes).

Return Value

address one past the last byte written

Parameters

NameDescription
bufferreceives the variable-width encoding
decimalvalue to encode