[#BloombergLP-balber-BerEncoder-encode-03] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::xref:BloombergLP/balber/BerEncoder.adoc[BerEncoder]::encode :relfileprefix: ../../../ :mrdocs: Encode the specified non‐modifiable `value` to the specified `streamBuf`. Return 0 on success, and a non‐zero value otherwise. == Synopsis Declared in `<balber_berencoder.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename TYPE> int encode( std::streambuf* streamBuf, TYPE const& value); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#