示例#1
0
文件: QuickLz.cs 项目: ww4u/MRQUpdate
        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);
        }
示例#2
0
文件: QuickLz.cs 项目: ww4u/MRQUpdate
        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);
        }
示例#3
0
文件: QuickLz.cs 项目: ww4u/MRQUpdate
 public uint SizeDecompressed(byte[] source)
 {
     return((uint)DllManager.qlz_size_decompressed(source));
 }
示例#4
0
文件: QuickLz.cs 项目: ww4u/MRQUpdate
 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)];
 }