| 1056 | } |
| 1057 | |
| 1058 | bool 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 | |
| 1079 | bool SerializerService::serializeSimulationParametersToFile(std::filesystem::path const& filename, SimulationParameters const& parameters) |
| 1080 | { |