CSharpFastPFOR icon indicating copy to clipboard operation
CSharpFastPFOR copied to clipboard

Crash when compressing large list of negative numbers

Open fredjekrueger opened this issue 3 years ago • 0 comments

Dear,

when compressing a large list (500.000 items) of only negative numbers, the compression algorithm crashes with an out of bounds exception. Simple sample program:

static void Main(string[] args)
{
    var intCompressor = new IntCompressor();

    var list = new List<int>();
    for(int i = 0; i < 500000; i++)
    {
        list.Add(-i);
    }

    var z = intCompressor.compress(list.ToArray());
}

fredjekrueger avatar Jul 04 '22 12:07 fredjekrueger