반응형 2019/071 C# GZIP 압축 압축 public static byte[] Compression(string str) { var rowData = Encoding.UTF8.GetBytes(str); byte[] compressed = null; using (var outStream = new MemoryStream()) { using (var hgs = new GZipStream(outStream, CompressionMode.Compress)) { hgs.Write(rowData, 0, rowData.Length); } compressed = outStream.ToArray(); } return compressed; } 해제 public static byte[] Decompress(byte[] gzip) { using (GZipStr.. 2019. 7. 16. 이전 1 다음 반응형