示例#1
0
 public static byte[] GetCompressedDocumentContentBytes(string path)
 {
     return(!string.IsNullOrEmpty(path) ? GZipUtils.Compress(File.ReadAllBytes(path)) : null);
 }
示例#2
0
 public static string GetBase64Document(string path)
 {
     return(!string.IsNullOrEmpty(path)
         ? Convert.ToBase64String(GZipUtils.Compress(File.ReadAllBytes(path)))
         : string.Empty);
 }