개정판 4c2dcd09
issue #00 CompressStamp 함수 생성.
Markus DataBase-Properties테이블-Stamp 데이터를 만들 수 있는 CompressStamp 함수
Change-Id: I62b563ba9591d84fbd8ef6690ef0362b8c8b2341
MarkupToPDF/Serialize/Core/JsonSerializerHelper.cs | ||
---|---|---|
132 | 132 |
returnstr = returnstr.Replace("daelim",CommonLib.Common.GetConfigString("Site","NAME","")); |
133 | 133 |
return returnstr; |
134 | 134 |
} |
135 |
|
|
136 |
public static string CompressStamp(string text) |
|
137 |
{ |
|
138 |
using (MemoryStream memoryStream = new MemoryStream()) |
|
139 |
{ |
|
140 |
using (ZipOutputStream zipOutputStream = new ZipOutputStream(memoryStream, ZipCompression.Deflated)) |
|
141 |
{ |
|
142 |
using (StreamWriter streamWriter = new StreamWriter(zipOutputStream)) |
|
143 |
{ |
|
144 |
streamWriter.Write(text); |
|
145 |
} |
|
146 |
|
|
147 |
byte[] bytes = memoryStream.ToArray(); |
|
148 |
return Convert.ToBase64String(bytes); |
|
149 |
} |
|
150 |
} |
|
151 |
} |
|
135 | 152 |
} |
136 | 153 |
} |
내보내기 Unified diff