MCPcopy Create free account
hub / github.com/chrxh/alien / serializeGenomeToString

Method serializeGenomeToString

source/PersisterInterface/SerializerService.cpp:1035–1056  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1033}
1034
1035bool SerializerService::serializeGenomeToString(std::string& output, std::vector<uint8_t> const& input)
1036{
1037 try {
1038 std::stringstream stdStream;
1039 zstr::ostream stream(stdStream, std::ios::binary);
1040 if (!stream) {
1041 return false;
1042 }
1043
1044 ClusteredDataDescription data;
1045 if (!wrapGenome(data, input)) {
1046 return false;
1047 }
1048
1049 serializeDataDescription(data, stream);
1050 stream.flush();
1051 output = stdStream.str();
1052 return true;
1053 } catch (...) {
1054 return false;
1055 }
1056}
1057
1058bool SerializerService::deserializeGenomeFromString(std::vector<uint8_t>& output, std::string const& input)
1059{

Callers 1

processRequestMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected