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

Method deserializeGenomeFromFile

source/PersisterInterface/SerializerService.cpp:1018–1033  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1016}
1017
1018bool 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
1035bool SerializerService::serializeGenomeToString(std::string& output, std::vector<uint8_t> const& input)
1036{

Callers 1

onOpenGenomeMethod · 0.80

Calls 1

logFunction · 0.85

Tested by

no test coverage detected