private static int decompress(PerformanceLogger logger, IntegerCODEC codec, int[] src, int srcLen, int[] dst)
        {
            IntWrapper inpos  = new IntWrapper();
            IntWrapper outpos = new IntWrapper();

            logger.decompressionTimer.start();
            codec.uncompress(src, inpos, srcLen, dst, outpos);
            logger.decompressionTimer.end();
            return(outpos.get());
        }
        private static int compress(PerformanceLogger logger, IntegerCODEC codec, int[] src, int[] dst)
        {
            IntWrapper inpos  = new IntWrapper();
            IntWrapper outpos = new IntWrapper();

            logger.compressionTimer.start();
            codec.compress(src, inpos, src.Length, dst, outpos);
            logger.compressionTimer.end();
            int outSize = outpos.get();

            logger.addOriginalSize(src.Length);
            logger.addCompressedSize(outSize);
            return(outSize);
        }
        private static void benchmark(StreamWriter csvWriter, string dataName, string codecName, IntegerCODEC codec, int[][] data, int repeat)
        {
            PerformanceLogger logger = new PerformanceLogger();

            int maxLen = getMaxLen(data);

            int[] compressBuffer   = new int[4 * maxLen + 1024];
            int[] decompressBuffer = new int[maxLen];

            for (int i = 0; i < repeat; ++i)
            {
                foreach (int[] array in data)
                {
                    int compSize   = compress(logger, codec, array, compressBuffer);
                    int decompSize = decompress(logger, codec, compressBuffer, compSize, decompressBuffer);
                    checkArray(array, decompressBuffer, decompSize, codec);
                }
            }

            if (csvWriter != null)
            {
                csvWriter.WriteLine("\"{0}\",\"{1}\",{2:0.00},{3:0},{4:0}", dataName, codecName, logger.getBitPerInt(), logger.getCompressSpeed(), logger.getDecompressSpeed());
            }
        }