Ejemplo n.º 1
0
        /// <summary>Decodes a byte[] according to the LZW encoding.</summary>
        /// <param name="in">byte[] to be decoded</param>
        /// <param name="out">the out stream which will be used to write the bytes.</param>
        /// <returns>decoded byte[]</returns>
        private static byte[] LZWDecodeInternal(byte[] @in, MemoryStream @out)
        {
            LZWDecoder lzw = new LZWDecoder();

            lzw.Decode(@in, @out);
            return(@out.ToArray());
        }
Ejemplo n.º 2
0
        /// <summary>Decodes a byte[] according to the LZW encoding.</summary>
        /// <param name="in">byte[] to be decoded</param>
        /// <returns>decoded byte[]</returns>
        public static byte[] LZWDecode(byte[] @in)
        {
            MemoryStream @out = new MemoryStream();
            LZWDecoder   lzw  = new LZWDecoder();

            lzw.Decode(@in, @out);
            return(@out.ToArray());
        }