UncompressString() 공개 정적인 메소드

public static UncompressString ( byte compressed, System.Stream decompressor ) : String
compressed byte
decompressor System.Stream
리턴 String
예제 #1
0
        public static string UncompressString(byte[] compressed)
        {
            using MemoryStream input = new MemoryStream(compressed);
            Stream decompressor = new GZipStream(input, CompressionMode.Decompress);

            return(ZlibBaseStream.UncompressString(compressed, decompressor));
        }
예제 #2
0
        public static string UncompressString(byte[] compressed)
        {
            using MemoryStream stream = new MemoryStream(compressed);
            Stream decompressor = new DeflateStream(stream, CompressionMode.Decompress);

            return(ZlibBaseStream.UncompressString(compressed, decompressor));
        }
예제 #3
0
 public static string UncompressString(byte[] compressed)
 {
     using (MemoryStream memoryStream = new MemoryStream(compressed))
     {
         Stream decompressor = (Stream) new GZipStream((Stream)memoryStream, CompressionMode.Decompress);
         return(ZlibBaseStream.UncompressString(compressed, decompressor));
     }
 }
예제 #4
0
        /// <summary>
        ///   Uncompress a DEFLATE'd byte array into a single string.
        /// </summary>
        ///
        /// <seealso cref="DeflateStream.CompressString(String)">DeflateStream.CompressString(String)</seealso>
        /// <seealso cref="DeflateStream.UncompressBuffer(byte[])">DeflateStream.UncompressBuffer(byte[])</seealso>
        /// <seealso cref="GZipStream.UncompressString(byte[])">GZipStream.UncompressString(byte[])</seealso>
        /// <seealso cref="ZlibStream.UncompressString(byte[])">ZlibStream.UncompressString(byte[])</seealso>
        ///
        /// <param name="compressed">
        ///   A buffer containing DEFLATE-compressed data.
        /// </param>
        ///
        /// <returns>The uncompressed string</returns>
        public static String UncompressString(byte[] compressed)
        {
            using (var input = new System.IO.MemoryStream(compressed)) {
                System.IO.Stream decompressor =
                    new DeflateStream(input, CompressionMode.Decompress);

                return(ZlibBaseStream.UncompressString(compressed, decompressor));
            }
        }
예제 #5
0
        public static string UncompressString(byte[] compressed)
        {
            string result;

            using (MemoryStream memoryStream = new MemoryStream(compressed))
            {
                Stream decompressor = new DeflateStream(memoryStream, CompressionMode.Decompress);
                result = ZlibBaseStream.UncompressString(compressed, decompressor);
            }
            return(result);
        }