mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-06-28 15:30:17 +08:00
Optimize RunLengthFilter
This commit is contained in:
parent
b498f5a076
commit
bd95adf4bc
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user