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

Method deserializeGenomeFromString

source/PersisterInterface/SerializerService.cpp:1058–1077  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1056}
1057
1058bool SerializerService::deserializeGenomeFromString(std::vector<uint8_t>& output, std::string const& input)
1059{
1060 try {
1061 std::stringstream stdStream(input);
1062 zstr::istream stream(stdStream, std::ios::binary);
1063 if (!stream) {
1064 return false;
1065 }
1066
1067 ClusteredDataDescription data;
1068 deserializeDataDescription(data, stream);
1069
1070 if (!unwrapGenome(output, data)) {
1071 return false;
1072 }
1073 return true;
1074 } catch (...) {
1075 return false;
1076 }
1077}
1078
1079bool SerializerService::serializeSimulationParametersToFile(std::filesystem::path const& filename, SimulationParameters const& parameters)
1080{

Callers 1

processRequestMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected