MCPcopy Create free account
hub / github.com/USCiLab/cereal / saveBinaryValue

Method saveBinaryValue

include/cereal/archives/json.hpp:184–191  ·  view source on GitHub ↗

Saves some binary data, encoded as a base64 string, with an optional name ! This will create a new node, optionally named, and insert a value that consists of the data encoded as a base64 string */

Source from the content-addressed store, hash-verified

182 /*! This will create a new node, optionally named, and insert a value that consists of
183 the data encoded as a base64 string */
184 void saveBinaryValue( const void * data, size_t size, const char * name = nullptr )
185 {
186 setNextName( name );
187 writeName();
188
189 auto base64string = base64::encode( reinterpret_cast<const unsigned char *>( data ), size );
190 saveValue( base64string );
191 };
192
193 //! @}
194 /*! @name Internal Functionality

Callers

nothing calls this directly

Calls 1

encodeFunction · 0.85

Tested by

no test coverage detected