Apache Mesos
|
Given a decoding function for individual records, this provides decoding from "Record-IO" data into typed records. More...
#include <recordio.hpp>
Public Member Functions | |
Decoder (std::function< Try< T >(const std::string &)> _deserialize) | |
Try< std::deque< Try< T > > > | decode (const std::string &data) |
Decodes another chunk of data from the "Record-IO" stream and returns the attempted decoding of any additional complete records. More... | |
Given a decoding function for individual records, this provides decoding from "Record-IO" data into typed records.
|
inline |
|
inline |
Decodes another chunk of data from the "Record-IO" stream and returns the attempted decoding of any additional complete records.
Returns an Error if the data contains an invalid length header, at which point the decoder will return Error for all subsequent calls.
TODO(bmahler): Allow the caller to signal EOF, this allows detection of invalid partial data at the end of the input.