MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
binaryio.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  mfem
 
namespace  mfem::bin_io
 

Functions

template<typename T >
void mfem::bin_io::write (std::ostream &os, T value)
 Write 'value' to stream.
 
template<typename T >
mfem::bin_io::read (std::istream &is)
 Read a value from the stream and return it.
 
template<typename T >
mfem::bin_io::read (const char *buf)
 Read a value of type T from a binary buffer and return it.
 
template<typename T >
void mfem::bin_io::AppendBytes (std::vector< char > &vec, const T &val)
 Append the binary representation of val to the byte buffer vec.
 
void mfem::bin_io::WriteBase64 (std::ostream &out, const void *bytes, size_t nbytes)
 Given a buffer bytes of length nbytes, encode the data in base-64 format, and write the encoded data to the output stream out.
 
void mfem::bin_io::DecodeBase64 (const char *src, size_t len, std::vector< char > &buf)
 Decode len base-64 encoded characters in the buffer src, and store the resulting decoded data in buf. buf will be resized as needed.
 
size_t mfem::bin_io::NumBase64Chars (size_t nbytes)
 Return the number of characters needed to encode nbytes in base-64.