mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-04-05 20:55:01 +08:00
Optimize RunLengthFilter
This commit is contained in:
parent
b498f5a076
commit
bd95adf4bc
@ -55,10 +55,8 @@
|
||||
|
||||
var byteToCopy = input[i + 1];
|
||||
|
||||
for (int j = 0; j < numberOfTimesToCopy; j++)
|
||||
{
|
||||
output.Write(byteToCopy);
|
||||
}
|
||||
output.GetSpan(numberOfTimesToCopy).Slice(0, numberOfTimesToCopy).Fill(byteToCopy);
|
||||
output.Advance(numberOfTimesToCopy);
|
||||
|
||||
// Move to the single byte after the byte to copy.
|
||||
i += 2;
|
||||
|
Loading…
Reference in New Issue
Block a user