public BitmapImage Convert([CanBeNull] string id) {
if (id == null) id = @"_";
BitmapImage bi;
if (Cache.TryGetValue(id, out bi)) return bi;
if (_archive == null) {
_archive = new ZipArchive(new MemoryStream(BinaryResources.Flags));
}
var entryStream = (_archive.GetEntry(id) ?? _archive.GetEntry(@"_"))?.Open();
if (entryStream == null) {
return null;
}
bi = new BitmapImage();
bi.BeginInit();
bi.CacheOption = BitmapCacheOption.OnLoad;
bi.StreamSource = entryStream.ReadAsMemoryStream();
bi.EndInit();
bi.Freeze();
Cache[id] = bi;
return bi;
}