[#BloombergLP-bslx-MarshallingUtil]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslx.adoc[bslx]::MarshallingUtil
:relfileprefix: ../../
:mrdocs:

This `struct` provides a namespace for a suite of functions that facilitate the marshalling of values, and C&hyphen;style arrays of values, of the fundamental integral and floating&hyphen;point types in a data&hyphen;independent, platform&hyphen;neutral representation&period;

== Synopsis

Declared in `&lt;bslx&lowbar;marshallingutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct MarshallingUtil;
----

== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslx/MarshallingUtil/_04enum.adoc[`Unnamed enum`] 
| Platform&hyphen;independent wire&hyphen;format sizes (in bytes) for marshalled types&period; Note that the wire&hyphen;format size may differ from the size in memory&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslx/MarshallingUtil/getArrayFloat32.adoc[`getArrayFloat32`] 
| Load into the specified `variables` the consecutive four&hyphen;byte IEEE single&hyphen;precision floating&hyphen;point numbers (in host byte order) comprised of each of the specified `numVariables` leading four&hyphen;byte sequences in the specified `buffer` (in network byte order)&period; The behavior is undefined unless `variables` has sufficient capacity, `buffer` has sufficient contents, and `0 &lt;&equals; numVariables`&period;
| xref:BloombergLP/bslx/MarshallingUtil/getArrayFloat64.adoc[`getArrayFloat64`] 
| Load into the specified `variables` the consecutive eight&hyphen;byte IEEE double&hyphen;precision floating&hyphen;point numbers (in host byte order) comprised of each of the specified `numVariables` leading eight&hyphen;byte sequences in the specified `buffer` (in network byte order)&period; The behavior is undefined unless `variables` has sufficient capacity, `buffer` has sufficient contents, and `0 &lt;&equals; numVariables`&period;
| xref:BloombergLP/bslx/MarshallingUtil/getArrayInt16.adoc[`getArrayInt16`] 
| Load into the specified `variables` the consecutive two&hyphen;byte, two&apos;s complement integers (in host byte order) comprised of each of the specified `numVariables` leading two&hyphen;byte sequences in the specified `buffer` (in network byte order)&period; The behavior is undefined unless `variables` has sufficient capacity, `buffer` has sufficient contents, and `0 &lt;&equals; numVariables`&period; Note that each of the values will be sign&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getArrayInt24.adoc[`getArrayInt24`] 
| Load into the specified `variables` the consecutive three&hyphen;byte, two&apos;s complement integers (in host byte order) comprised of each of the specified `numVariables` leading three&hyphen;byte sequences in the specified `buffer` (in network byte order)&period; The behavior is undefined unless `variables` has sufficient capacity, `buffer` has sufficient contents, and `0 &lt;&equals; numVariables`&period; Note that each of the values will be sign&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getArrayInt32.adoc[`getArrayInt32`] 
| Load into the specified `variables` the consecutive four&hyphen;byte, two&apos;s complement integers (in host byte order) comprised of each of the specified `numVariables` leading four&hyphen;byte sequences in the specified `buffer` (in network byte order)&period; The behavior is undefined unless `variables` has sufficient capacity, `buffer` has sufficient contents, and `0 &lt;&equals; numVariables`&period; Note that each of the values will be sign&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getArrayInt40.adoc[`getArrayInt40`] 
| Load into the specified `variables` the consecutive five&hyphen;byte, two&apos;s complement integers (in host byte order) comprised of each of the specified `numVariables` leading five&hyphen;byte sequences in the specified `buffer` (in network byte order)&period; The behavior is undefined unless `variables` has sufficient capacity, `buffer` has sufficient contents, and `0 &lt;&equals; numVariables`&period; Note that each of the values will be sign&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getArrayInt48.adoc[`getArrayInt48`] 
| Load into the specified `variables` the consecutive six&hyphen;byte, two&apos;s complement integers (in host byte order) comprised of each of the specified `numVariables` leading six&hyphen;byte sequences in the specified `buffer` (in network byte order)&period; The behavior is undefined unless `variables` has sufficient capacity, `buffer` has sufficient contents, and `0 &lt;&equals; numVariables`&period; Note that each of the values will be sign&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getArrayInt56.adoc[`getArrayInt56`] 
| Load into the specified `variables` the consecutive seven&hyphen;byte, two&apos;s complement integers (in host byte order) comprised of each of the specified `numVariables` leading seven&hyphen;byte sequences in the specified `buffer` (in network byte order)&period; The behavior is undefined unless `variables` has sufficient capacity, `buffer` has sufficient contents, and `0 &lt;&equals; numVariables`&period; Note that each of the values will be sign&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getArrayInt64.adoc[`getArrayInt64`] 
| Load into the specified `variables` the consecutive eight&hyphen;byte, two&apos;s complement integers (in host byte order) comprised of each of the specified `numVariables` leading eight&hyphen;byte sequences in the specified `buffer` (in network byte order)&period; The behavior is undefined unless `variables` has sufficient capacity, `buffer` has sufficient contents, and `0 &lt;&equals; numVariables`&period; Note that each of the values will be sign&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getArrayInt8-057.adoc[`getArrayInt8`] 
| `getArrayInt8` overloads
| xref:BloombergLP/bslx/MarshallingUtil/getArrayUint16.adoc[`getArrayUint16`] 
| Load into the specified `variables` the consecutive two&hyphen;byte, two&apos;s complement unsigned integers (in host byte order) comprised of each of the specified `numVariables` leading two&hyphen;byte sequences in the specified `buffer` (in network byte order)&period; The behavior is undefined unless `variables` has sufficient capacity, `buffer` has sufficient contents, and `0 &lt;&equals; numVariables`&period; Note that each of the values will be zero&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getArrayUint24.adoc[`getArrayUint24`] 
| Load into the specified `variables` the consecutive three&hyphen;byte, two&apos;s complement unsigned integers (in host byte order) comprised of each of the specified `numVariables` leading three&hyphen;byte sequences in the specified `buffer` (in network byte order)&period; The behavior is undefined unless `variables` has sufficient capacity, `buffer` has sufficient contents, and `0 &lt;&equals; numVariables`&period; Note that each of the values will be zero&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getArrayUint32.adoc[`getArrayUint32`] 
| Load into the specified `variables` the consecutive four&hyphen;byte, two&apos;s complement unsigned integers (in host byte order) comprised of each of the specified `numVariables` leading four&hyphen;byte sequences in the specified `buffer` (in network byte order)&period; The behavior is undefined unless `variables` has sufficient capacity, `buffer` has sufficient contents, and `0 &lt;&equals; numVariables`&period; Note that each of the values will be zero&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getArrayUint40.adoc[`getArrayUint40`] 
| Load into the specified `variables` the consecutive five&hyphen;byte, two&apos;s complement unsigned integers (in host byte order) comprised of each of the specified `numVariables` leading five&hyphen;byte sequences in the specified `buffer` (in network byte order)&period; The behavior is undefined unless `variables` has sufficient capacity, `buffer` has sufficient contents, and `0 &lt;&equals; numVariables`&period; Note that each of the values will be zero&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getArrayUint48.adoc[`getArrayUint48`] 
| Load into the specified `variables` the consecutive six&hyphen;byte, two&apos;s complement unsigned integers (in host byte order) comprised of each of the specified `numVariables` leading six&hyphen;byte sequences in the specified `buffer` (in network byte order)&period; The behavior is undefined unless `variables` has sufficient capacity, `buffer` has sufficient contents, and `0 &lt;&equals; numVariables`&period; Note that each of the values will be zero&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getArrayUint56.adoc[`getArrayUint56`] 
| Load into the specified `variables` the consecutive seven&hyphen;byte, two&apos;s complement unsigned integers (in host byte order) comprised of each of the specified `numVariables` leading seven&hyphen;byte sequences in the specified `buffer` (in network byte order)&period; The behavior is undefined unless `variables` has sufficient capacity, `buffer` has sufficient contents, and `0 &lt;&equals; numVariables`&period; Note that each of the values will be zero&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getArrayUint64.adoc[`getArrayUint64`] 
| Load into the specified `variables` the consecutive eight&hyphen;byte, two&apos;s complement unsigned integers (in host byte order) comprised of each of the specified `numVariables` leading eight&hyphen;byte sequences in the specified `buffer` (in network byte order)&period; The behavior is undefined unless `variables` has sufficient capacity, `buffer` has sufficient contents, and `0 &lt;&equals; numVariables`&period; Note that each of the values will be zero&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getFloat32.adoc[`getFloat32`] 
| Load into the specified `variable` the four&hyphen;byte IEEE single&hyphen;precision floating&hyphen;point number (in host byte order) comprised of the initial four bytes of the specified `buffer` (in network byte order)&period; The behavior is undefined unless `buffer` has sufficient contents&period;
| xref:BloombergLP/bslx/MarshallingUtil/getFloat64.adoc[`getFloat64`] 
| Load into the specified `variable` the eight&hyphen;byte IEEE double&hyphen;precision floating&hyphen;point number (in host byte order) comprised of the initial eight bytes of the specified `buffer` (in network byte order)&period; The behavior is undefined unless `buffer` has sufficient contents&period;
| xref:BloombergLP/bslx/MarshallingUtil/getInt16.adoc[`getInt16`] 
| Load into the specified `variable` the two&hyphen;byte, two&apos;s complement integer (in host byte order) comprised of the initial two bytes of the specified `buffer` (in network byte order)&period; The behavior is undefined unless `buffer` has sufficient contents&period; Note that the value will be sign&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getInt24.adoc[`getInt24`] 
| Load into the specified `variable` the three&hyphen;byte, two&apos;s complement integer (in host byte order) comprised of the initial three bytes of the specified `buffer` (in network byte order)&period; The behavior is undefined unless `buffer` has sufficient contents&period; Note that the value will be sign&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getInt32.adoc[`getInt32`] 
| Load into the specified `variable` the four&hyphen;byte, two&apos;s complement integer (in host byte order) comprised of the initial four bytes of the specified `buffer` (in network byte order)&period; The behavior is undefined unless `buffer` has sufficient contents&period; Note that the value will be sign&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getInt40.adoc[`getInt40`] 
| Load into the specified `variable` the five&hyphen;byte, two&apos;s complement integer (in host byte order) comprised of the initial five bytes of the specified `buffer` (in network byte order)&period; The behavior is undefined unless `buffer` has sufficient contents&period; Note that the value will be sign&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getInt48.adoc[`getInt48`] 
| Load into the specified `variable` the six&hyphen;byte, two&apos;s complement integer (in host byte order) comprised of the initial six bytes of the specified `buffer` (in network byte order)&period; The behavior is undefined unless `buffer` has sufficient contents&period; Note that the value will be sign&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getInt56.adoc[`getInt56`] 
| Load into the specified `variable` the seven&hyphen;byte, two&apos;s complement integer (in host byte order) comprised of the initial seven bytes of the specified `buffer` (in network byte order)&period; The behavior is undefined unless `buffer` has sufficient contents&period; Note that the value will be sign&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getInt64.adoc[`getInt64`] 
| Load into the specified `variable` the eight&hyphen;byte, two&apos;s complement integer (in host byte order) comprised of the initial eight bytes of the specified `buffer` (in network byte order)&period; The behavior is undefined unless `buffer` has sufficient contents&period; Note that the value will be sign&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getInt8-03.adoc[`getInt8`] 
| `getInt8` overloads
| xref:BloombergLP/bslx/MarshallingUtil/getUint16.adoc[`getUint16`] 
| Load into the specified `variable` the two&hyphen;byte, two&apos;s complement unsigned integer (in host byte order) comprised of the initial two bytes of the specified `buffer` (in network byte order)&period; The behavior is undefined unless `buffer` has sufficient contents&period; Note that the value will be zero&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getUint24.adoc[`getUint24`] 
| Load into the specified `variable` the three&hyphen;byte, two&apos;s complement unsigned integer (in host byte order) comprised of the initial three bytes of the specified `buffer` (in network byte order)&period; The behavior is undefined unless `buffer` has sufficient contents&period; Note that the value will be zero&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getUint32.adoc[`getUint32`] 
| Load into the specified `variable` the four&hyphen;byte, two&apos;s complement unsigned integer (in host byte order) comprised of the initial four bytes of the specified `buffer` (in network byte order)&period; The behavior is undefined unless `buffer` has sufficient contents&period; Note that the value will be zero&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getUint40.adoc[`getUint40`] 
| Load into the specified `variable` the five&hyphen;byte, two&apos;s complement unsigned integer (in host byte order) comprised of the initial five bytes of the specified `buffer` (in network byte order)&period; The behavior is undefined unless `buffer` has sufficient contents&period; Note that the value will be zero&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getUint48.adoc[`getUint48`] 
| Load into the specified `variable` the six&hyphen;byte, two&apos;s complement unsigned integer (in host byte order) comprised of the initial six bytes of the specified `buffer` (in network byte order)&period; The behavior is undefined unless `buffer` has sufficient contents&period; Note that the value will be zero&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getUint56.adoc[`getUint56`] 
| Load into the specified `variable` the seven&hyphen;byte, two&apos;s complement unsigned integer (in host byte order) comprised of the initial seven bytes of the specified `buffer` (in network byte order)&period; The behavior is undefined unless `buffer` has sufficient contents&period; Note that the value will be zero&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/getUint64.adoc[`getUint64`] 
| Load into the specified `variable` the eight&hyphen;byte, two&apos;s complement unsigned integer (in host byte order) comprised of the initial eight bytes of the specified `buffer` (in network byte order)&period; The behavior is undefined unless `buffer` has sufficient contents&period; Note that the value will be zero&hyphen;extended&period;
| xref:BloombergLP/bslx/MarshallingUtil/putArrayFloat32.adoc[`putArrayFloat32`] 
| Load into the specified `buffer` the consecutive four&hyphen;byte IEEE single&hyphen;precision floating&hyphen;point numbers (in network byte order) comprised of the most&hyphen;significant four bytes of each of the specified `numValues` leading entries in the specified `values` (in host byte order)&period; The behavior is undefined unless `buffer` has sufficient capacity, `values` has sufficient contents, and `0 &lt;&equals; numValues`&period; Note that for non&hyphen;conforming platforms, this operation may be lossy&period;
| xref:BloombergLP/bslx/MarshallingUtil/putArrayFloat64.adoc[`putArrayFloat64`] 
| Load into the specified `buffer` the consecutive eight&hyphen;byte IEEE double&hyphen;precision floating&hyphen;point numbers (in network byte order) comprised of the most&hyphen;significant eight bytes of each of the specified `numValues` leading entries in the specified `values` (in host byte order)&period; The behavior is undefined unless `buffer` has sufficient capacity, `values` has sufficient contents, and `0 &lt;&equals; numValues`&period; Note that for non&hyphen;conforming platforms, this operation may be lossy&period;
| xref:BloombergLP/bslx/MarshallingUtil/putArrayInt16-02.adoc[`putArrayInt16`] 
| `putArrayInt16` overloads
| xref:BloombergLP/bslx/MarshallingUtil/putArrayInt24-07.adoc[`putArrayInt24`] 
| `putArrayInt24` overloads
| xref:BloombergLP/bslx/MarshallingUtil/putArrayInt32-02.adoc[`putArrayInt32`] 
| `putArrayInt32` overloads
| xref:BloombergLP/bslx/MarshallingUtil/putArrayInt40-05.adoc[`putArrayInt40`] 
| `putArrayInt40` overloads
| xref:BloombergLP/bslx/MarshallingUtil/putArrayInt48-06.adoc[`putArrayInt48`] 
| `putArrayInt48` overloads
| xref:BloombergLP/bslx/MarshallingUtil/putArrayInt56-0d.adoc[`putArrayInt56`] 
| `putArrayInt56` overloads
| xref:BloombergLP/bslx/MarshallingUtil/putArrayInt64-0d.adoc[`putArrayInt64`] 
| `putArrayInt64` overloads
| xref:BloombergLP/bslx/MarshallingUtil/putArrayInt8-05.adoc[`putArrayInt8`] 
| `putArrayInt8` overloads
| xref:BloombergLP/bslx/MarshallingUtil/putFloat32.adoc[`putFloat32`] 
| Load into the specified `buffer` the four&hyphen;byte IEEE single&hyphen;precision floating&hyphen;point number (in network byte order) comprised of the most&hyphen;significant four bytes of the specified `value` (in host byte order)&period; The behavior is undefined unless `buffer` has sufficient capacity&period; Note that for non&hyphen;conforming platforms, this operation may be lossy&period;
| xref:BloombergLP/bslx/MarshallingUtil/putFloat64.adoc[`putFloat64`] 
| Load into the specified `buffer` the eight&hyphen;byte IEEE double&hyphen;precision floating&hyphen;point number (in network byte order) comprised of the most&hyphen;significant eight bytes of the specified `value` (in host byte order)&period; The behavior is undefined unless `buffer` has sufficient capacity&period; Note that for non&hyphen;conforming platforms, this operation may be lossy&period;
| xref:BloombergLP/bslx/MarshallingUtil/putInt16.adoc[`putInt16`] 
| Load into the specified `buffer` the two&hyphen;byte, two&apos;s complement integer (in network byte order) comprised of the least&hyphen;significant two bytes of the specified `value` (in host byte order)&period; The behavior is undefined unless `buffer` has sufficient capacity&period; Note that this function applies equally to unsigned 32&hyphen;bit values, and signed and unsigned 16&hyphen; and 8&hyphen;bit values&period;
| xref:BloombergLP/bslx/MarshallingUtil/putInt24.adoc[`putInt24`] 
| Load into the specified `buffer` the three&hyphen;byte, two&apos;s complement integer (in network byte order) comprised of the least&hyphen;significant three bytes of the specified `value` (in host byte order)&period; The behavior is undefined unless `buffer` has sufficient capacity&period; Note that this function applies equally to unsigned 32&hyphen;bit values, and signed and unsigned 16&hyphen; and 8&hyphen;bit values&period;
| xref:BloombergLP/bslx/MarshallingUtil/putInt32.adoc[`putInt32`] 
| Load into the specified `buffer` the four&hyphen;byte, two&apos;s complement integer (in network byte order) comprised of the least&hyphen;significant four bytes of the specified `value` (in host byte order)&period; The behavior is undefined unless `buffer` has sufficient capacity&period; Note that this function applies equally to unsigned 32&hyphen;bit values, and signed and unsigned 16&hyphen; and 8&hyphen;bit values&period;
| xref:BloombergLP/bslx/MarshallingUtil/putInt40.adoc[`putInt40`] 
| Load into the specified `buffer` the five&hyphen;byte, two&apos;s complement integer (in network byte order) comprised of the least&hyphen;significant five bytes of the specified `value` (in host byte order)&period; The behavior is undefined unless `buffer` has sufficient capacity&period; Note that this function applies equally to unsigned 64&hyphen;bit values&period;
| xref:BloombergLP/bslx/MarshallingUtil/putInt48.adoc[`putInt48`] 
| Load into the specified `buffer` the six&hyphen;byte, two&apos;s complement integer (in network byte order) comprised of the least&hyphen;significant six bytes of the specified `value` (in host byte order)&period; The behavior is undefined unless `buffer` has sufficient capacity&period; Note that this function applies equally to unsigned 64&hyphen;bit values&period;
| xref:BloombergLP/bslx/MarshallingUtil/putInt56.adoc[`putInt56`] 
| Load into the specified `buffer` the seven&hyphen;byte, two&apos;s complement integer (in network byte order) comprised of the least&hyphen;significant seven bytes of the specified `value` (in host byte order)&period; The behavior is undefined unless `buffer` has sufficient capacity&period; Note that this function applies equally to unsigned 64&hyphen;bit values&period;
| xref:BloombergLP/bslx/MarshallingUtil/putInt64.adoc[`putInt64`] 
| Load into the specified `buffer` the eight&hyphen;byte, two&apos;s complement integer (in network byte order) comprised of the least&hyphen;significant eight bytes of the specified `value` (in host byte order)&period; The behavior is undefined unless `buffer` has sufficient capacity&period; Note that this function applies equally to unsigned 64&hyphen;bit values&period;
| xref:BloombergLP/bslx/MarshallingUtil/putInt8.adoc[`putInt8`] 
| Load into the specified `buffer` the one&hyphen;byte, two&apos;s complement integer comprised of the least&hyphen;significant one byte of the specified `value`&period; The behavior is undefined unless `buffer` has sufficient capacity&period; Note that this function applies equally to unsigned 32&hyphen;bit values, and signed and unsigned 16&hyphen; and 8&hyphen;bit values&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
