Esempio n. 1
0
        public byte[] Decompress(byte[] source)
        {
            byte[] d = new byte[(uint)DllManager.qlz_size_decompressed(source)];
            var    s = (uint)DllManager.qlz_decompress(source, d, state_decompress);

            return(d);
        }
Esempio n. 2
0
        public byte[] Compress(byte[] source)
        {
            byte[] d = new byte[source.Length + 400];
            var    s = (uint)DllManager.qlz_compress(source, d, (IntPtr)source.Length, state_compress);

            byte[] d2 = new byte[s];
            Array.Copy(d, d2, s);
            return(d2);
        }
Esempio n. 3
0
 public uint SizeDecompressed(byte[] source)
 {
     return((uint)DllManager.qlz_size_decompressed(source));
 }
Esempio n. 4
0
 public QuickLz()
 {
     state_compress   = new byte[DllManager.qlz_get_setting(1)];
     state_decompress = (uint)DllManager.qlz_get_setting(3) == 0 ?
                        state_compress : new byte[DllManager.qlz_get_setting(2)];
 }