ServiceStack.StreamExt.DecompressBytes C# (CSharp) Method

DecompressBytes() public static method

Decompresses the specified gz buffer using the default compression method: Inflate
public static DecompressBytes ( this gzBuffer, string compressionType ) : byte[]
gzBuffer this
compressionType string
return byte[]
        public static byte[] DecompressBytes(this byte[] gzBuffer, string compressionType)
        {
            if (compressionType == CompressionTypes.Deflate)
                return DeflateProvider.InflateBytes(gzBuffer);

            if (compressionType == CompressionTypes.GZip)
                return GZipProvider.GUnzipBytes(gzBuffer);

            throw new NotSupportedException(compressionType);
        }