after it makes that array of 256 0xFFFFs, it makes another array that's the values 0-255. suspicious. definitely doing some kind of huffmanning or LZ*