1
0
Fork 0
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:
fkaelberer 2014-06-27 09:09:54 +02:00
parent 9a41659ae7
commit fc73e2e173
2 changed files with 7 additions and 13 deletions

View file

@ -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;