private TextureMeta LoadBitmapMeta(ZipArchiveEntry entry, Match match) { TextureMeta meta; using (var stream = entry.Open()) { //using (StreamReader sr = new StreamReader(stream)) { //string content = sr.ReadToEnd(); meta = TextureMeta.FromJson(Encoding.UTF8.GetString(stream.ReadToSpan(entry.Length))); } } _textureMetaCache[match.Groups["filename"].Value] = meta; return(meta); }
private TextureMeta LoadBitmapMeta(ZipArchiveEntry entry, Match match) { TextureMeta meta; using (var stream = entry.Open()) { using (StreamReader sr = new StreamReader(stream)) { string content = sr.ReadToEnd(); meta = TextureMeta.FromJson(content); } } _textureMetaCache[match.Groups["filename"].Value] = meta; return(meta); }