#pragma once #include #include #include #include #include template TrieType LoadTrieFromArchive(const TString& key, const unsigned char (&data)[N], bool ignoreErrors = false) { TArchiveReader archive(TBlob::NoCopy(data, sizeof(data))); if (archive.Has(key)) { TAutoPtr trie = archive.ObjectByKey(key); return TrieType(TBlob::FromStream(*trie)); } if (!ignoreErrors) { ythrow yexception() << "Resource " << key << " not found"; } return TrieType(); }