public static Tag Load(string filePath, bool isGZipped) { using (var fileStream = new FileStream(filePath, FileMode.Open)) { if (isGZipped) { using (var gzipStream = new GZipStream(fileStream, CompressionMode.Decompress)) { return gzipStream.ReadTag(); } } else { return fileStream.ReadTag(); } } }