| 1016 | } |
| 1017 | |
| 1018 | bool SerializerService::deserializeGenomeFromFile(std::vector<uint8_t>& genome, std::filesystem::path const& filename) |
| 1019 | { |
| 1020 | try { |
| 1021 | log(Priority::Important, "load genome from " + filename.string()); |
| 1022 | ClusteredDataDescription data; |
| 1023 | if (!deserializeDataDescription(data, filename)) { |
| 1024 | return false; |
| 1025 | } |
| 1026 | if (!unwrapGenome(genome, data)) { |
| 1027 | return false; |
| 1028 | } |
| 1029 | return true; |
| 1030 | } catch (...) { |
| 1031 | return false; |
| 1032 | } |
| 1033 | } |
| 1034 | |
| 1035 | bool SerializerService::serializeGenomeToString(std::string& output, std::vector<uint8_t> const& input) |
| 1036 | { |