Esempio n. 1
0
        private static ulong GetCompressRating(uint dictionarySize, ulong elapsedTime, ulong size)
        {
            ulong t = LzmaBench.GetLogSize(dictionarySize) - (18 << LzmaBench.kSubBits);
            ulong numCommandsForOne = 1060 + ((t * t * 10) >> (2 * LzmaBench.kSubBits));
            ulong numCommands       = size * numCommandsForOne;

            return(LzmaBench.MyMultDiv64(numCommands, elapsedTime));
        }
Esempio n. 2
0
        private static void PrintResults(uint dictionarySize, ulong elapsedTime, ulong size, bool decompressMode, ulong secondSize)
        {
            ulong speed = LzmaBench.MyMultDiv64(size, elapsedTime);

            LzmaBench.PrintValue(speed / 1024);
            Console.Write(" KB/s  ");
            ulong rating;

            if (decompressMode)
            {
                rating = LzmaBench.GetDecompressRating(elapsedTime, size, secondSize);
            }
            else
            {
                rating = LzmaBench.GetCompressRating(dictionarySize, elapsedTime, size);
            }

            LzmaBench.PrintRating(rating);
        }
Esempio n. 3
0
        private static ulong GetDecompressRating(ulong elapsedTime, ulong outSize, ulong inSize)
        {
            ulong numCommands = inSize * 220 + outSize * 20;

            return(LzmaBench.MyMultDiv64(numCommands, elapsedTime));
        }