Exemple #1
0
 public static void Save(Tag tag, string filePath, bool isGZipped)
 {
     using (var fileStream = new FileStream(filePath, FileMode.Create, FileAccess.Write))
     {
         if (isGZipped)
         {
             using (var gzipStream = new GZipStream(fileStream, CompressionMode.Compress))
             {
                 gzipStream.WriteTag(tag);
             }
         }
         else
         {
             fileStream.WriteTag(tag);
         }
     }
 }