mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
use getBytes() instead of looping over getByte()
This commit is contained in:
parent
9a41659ae7
commit
fc73e2e173
2 changed files with 7 additions and 13 deletions
|
@ -539,12 +539,10 @@ var FlateStream = (function FlateStreamClosure() {
|
|||
this.eof = true;
|
||||
}
|
||||
} else {
|
||||
for (var n = bufferLength; n < end; ++n) {
|
||||
if ((b = str.getByte()) === -1) {
|
||||
this.eof = true;
|
||||
break;
|
||||
}
|
||||
buffer[n] = b;
|
||||
var block = str.getBytes(blockLen);
|
||||
buffer.set(block, bufferLength);
|
||||
if (block.length < blockLen) {
|
||||
this.eof = true;
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue