.TH "cereal::BinaryOutputArchive" 3 "Sat Aug 29 2026 00:42:30" "cereal" \" -*- nroff -*- .ad l .nh .SH NAME cereal::BinaryOutputArchive \- An output archive designed to save data in a compact binary representation\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherits \fBcereal::OutputArchive< BinaryOutputArchive, AllowEmptyClassElision >\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBBinaryOutputArchive\fP (std::ostream &stream)" .br .RI "Construct, outputting to the provided stream\&. " .ti -1c .RI "void \fBsaveBinary\fP (const void *data, std::streamsize size)" .br .RI "Writes size bytes of data to the output stream\&. " .in -1c Public Member Functions inherited from \fBcereal::OutputArchive< BinaryOutputArchive, AllowEmptyClassElision >\fP .in +1c .ti -1c .RI "\fBOutputArchive\fP (\fBBinaryOutputArchive\fP *const derived)" .br .RI "Construct the output archive\&. " .ti -1c .RI "\fBOutputArchive\fP & \fBoperator=\fP (\fBOutputArchive\fP const &)=delete" .br .ti -1c .RI "\fBBinaryOutputArchive\fP & \fBoperator()\fP (Types &&\&.\&.\&. args)" .br .RI "Serializes all passed in data\&. " .ti -1c .RI "void \fBserializeDeferments\fP ()" .br .RI "Serializes any data marked for deferment using defer\&. " .ti -1c .RI "std::uint32_t \fBregisterSharedPointer\fP (const std::shared_ptr< const void > &sharedPointer)" .br .RI "Registers a shared pointer with the archive\&. " .ti -1c .RI "std::uint32_t \fBregisterPolymorphicType\fP (char const *name)" .br .RI "Registers a polymorphic type name with the archive\&. " .in -1c .in +1c .ti -1c .RI "\fBBinaryOutputArchive\fP & \fBoperator&\fP (T &&arg)" .br .RI "Serializes passed in data\&. " .in -1c .in +1c .ti -1c .RI "\fBBinaryOutputArchive\fP & \fBoperator<<\fP (T &&arg)" .br .RI "Serializes passed in data\&. " .in -1c Public Member Functions inherited from \fBcereal::detail::OutputArchiveBase\fP .in +1c .ti -1c .RI "\fBOutputArchiveBase\fP (OutputArchiveBase &&) \fBCEREAL_NOEXCEPT\fP" .br .ti -1c .RI "OutputArchiveBase & \fBoperator=\fP (OutputArchiveBase &&) \fBCEREAL_NOEXCEPT\fP" .br .in -1c .SS "Additional Inherited Members" .in +1c .ti -1c .RI "using \fBis_loading\fP" .br .RI "Indicates this archive is not intended for loading\&. " .in -1c .in +1c .ti -1c .RI "using \fBis_saving\fP" .br .RI "Indicates this archive is intended for saving\&. " .in -1c .SH "Detailed Description" .PP An output archive designed to save data in a compact binary representation\&. This archive outputs data to a stream in an extremely compact binary representation with as little extra metadata as possible\&. .PP This archive does nothing to ensure that the endianness of the saved and loaded data is the same\&. If you need to have portability over architectures with different endianness, use \fBPortableBinaryOutputArchive\fP\&. .PP When using a binary archive and a file stream, you must use the std::ios::binary format flag to avoid having your data altered inadvertently\&. .SH "Constructor & Destructor Documentation" .PP .SS "cereal::BinaryOutputArchive::BinaryOutputArchive (std::ostream & stream)\fR [inline]\fP" .PP Construct, outputting to the provided stream\&. .PP \fBParameters\fP .RS 4 \fIstream\fP The stream to output to\&. Can be a stringstream, a file stream, or even cout! .RE .PP .SH "Author" .PP Generated automatically by Doxygen for cereal from the source code\&.