[#BloombergLP-balber-BerUtil_LengthImpUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::BerUtil_LengthImpUtil :relfileprefix: ../../ :mrdocs: This component‐private utility `struct` provides a namespace for a suite of functions used by `BerUtil` to implement BER length quantity encoding and decoding. == Synopsis Declared in `<balber_berutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct BerUtil_LengthImpUtil; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balber/BerUtil_LengthImpUtil/Constants.adoc[`Constants`] | `Constants` is an alias to a namespace for a suite of general‐purpose constants that occur when encoding or decoding BER data. | xref:BloombergLP/balber/BerUtil_LengthImpUtil/RawIntegerUtil.adoc[`RawIntegerUtil`] | `RawIntegerUtil` is an alias to a namespace for a suite of functions used to implement integer encoding. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/balber/BerUtil_LengthImpUtil/getEndOfContentOctets.adoc[`getEndOfContentOctets`] | Decode the "end‐of‐content" octets (two consecutive zero‐octets) from the specified `streamBuf` and add the number of bytes consumed (which is always 2) to the specified `accumNumBytesConsumed`. Return 0 on success, and a non‐zero value otherwise. | xref:BloombergLP/balber/BerUtil_LengthImpUtil/getLength.adoc[`getLength`] | Decode the length octets from the specified `streamBuf` and load the result to the specified `result`. If the length is indefinite (i.e., contents will be terminated by "end‐of‐content" octets) then `result` will be set to `k_INDEFINITE_LENGTH`. Add the number of bytes consumed to the specified `accumNumBytesConsumed`. Return 0 on success, and a non‐zero value otherwise. | xref:BloombergLP/balber/BerUtil_LengthImpUtil/putEndOfContentOctets.adoc[`putEndOfContentOctets`] | Encode the identifier octets for the specified `tagClass`, `tagType` and `tagNumber` to the specified `streamBuf`. Return 0 on success, and a non‐zero value otherwise. | xref:BloombergLP/balber/BerUtil_LengthImpUtil/putIndefiniteLengthOctet.adoc[`putIndefiniteLengthOctet`] | Encode the "indefinite‐length" octet onto the specified `streamBuf`. This octet signifies that the length of the contents is indefinite (i.e., contents will be terminated by end of content octets). Return 0 on success, and a non‐zero value otherwise. | xref:BloombergLP/balber/BerUtil_LengthImpUtil/putLength.adoc[`putLength`] | Encode the specified `length` length octets to the specified `streamBuf`. Return 0 on success, and a non‐zero value otherwise. The behavior is undefined unless `0 <= length`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#