示例#1
0
        public static byte[] Compress(byte[] src)
        {
            NoxLzCompression nxz = new NoxLzCompression();

            nxz.BuildInitialAlphabet();
            // init variables
            nxz.bitwtr        = new BitWriter(WINDOW_SIZE);
            nxz.SymbolCounter = new int[SYMBOLS];

            return(nxz.CompressImpl(src, src.Length));
        }
示例#2
0
        public static bool Decompress(byte[] src, byte[] dst)
        {
            NoxLzCompression nxz = new NoxLzCompression();

            nxz.BuildInitialAlphabet();
            // initialize required variables
            nxz.bitrdr        = new BitReader(src);
            nxz.SymbolCounter = new int[SYMBOLS];

            return(nxz.DecompressImpl(dst, dst.Length));
        }
示例#3
0
        public static byte[] Compress(byte[] src)
        {
            Map map = new Map();
            NoxLzCompression nxz = new NoxLzCompression();

            map.progress = 2;
            nxz.BuildInitialAlphabet();
            map.progress = 4;
            // init variables
            nxz.bitwtr        = new BitWriter();
            map.progress      = 6;
            nxz.SymbolCounter = new int[SYMBOLS];
            map.progress      = 10;
            return(nxz.CompressImpl(src, src.Length));
        }