Optimize RunLengthFilter

This commit is contained in:
Jason Nelson 2024-04-01 22:34:10 -07:00 committed by BobLd
parent b498f5a076
commit bd95adf4bc

View File

@ -55,10 +55,8 @@
var byteToCopy = input[i + 1]; var byteToCopy = input[i + 1];
for (int j = 0; j < numberOfTimesToCopy; j++) output.GetSpan(numberOfTimesToCopy).Slice(0, numberOfTimesToCopy).Fill(byteToCopy);
{ output.Advance(numberOfTimesToCopy);
output.Write(byteToCopy);
}
// Move to the single byte after the byte to copy. // Move to the single byte after the byte to copy.
i += 2; i += 2;