Ejemplo n.º 1
0
        /// <summary>
        /// Function to decompress bytes using SevenZipHelper
        /// </summary>
        /// <param name="inData">The byte which needs to be decompressed</param>
        /// <returns>Returns the byte decompressed</returns>
        public static byte[] DecompressBytes(byte[] inData)
        {
            Console.WriteLine("Compressed data is {0} bytes", inData.Length);
            //Decompress byte array
            byte[] decompressed = SevenZipHelper.Decompress(inData);
            Console.WriteLine("Decompressed data is {0} bytes", decompressed.Length);

            return(decompressed);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Function to compress bytes using SevenZipHelper
        /// </summary>
        /// <param name="inData">The byte which needs to be compressed</param>
        /// <returns>Returns the byte compressed</returns>
        public static byte[] CompressBytes(byte[] inData)
        {
            Console.WriteLine("Original data is {0} bytes", inData.Length);
            //Compress byte array
            byte[] compressed = SevenZipHelper.Compress(inData);
            Console.WriteLine("Compressed data is {0} bytes", compressed.Length);

            return(compressed);
        }