public static Compress ( this text, string compressionType ) : byte[] | ||
text | this | The text. |
compressionType | string | Type of the compression. |
리턴 | byte[] |
public static byte[] Compress(this string text, string compressionType)
{
if (compressionType == CompressionTypes.Deflate)
return Deflate(text);
if (compressionType == CompressionTypes.GZip)
return GZip(text);
throw new NotSupportedException(compressionType);
}