1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Improves search of EI (end of inlined image)

This commit is contained in:
Yury Delendik 2013-06-21 17:03:03 -05:00
parent ce218d021f
commit c68d125f17
4 changed files with 30 additions and 1 deletions

View file

@ -57,6 +57,11 @@ var Stream = (function StreamClosure() {
this.pos = end;
return bytes.subarray(pos, end);
},
peekBytes: function Stream_peekBytes(length) {
var bytes = this.getBytes(length);
this.pos -= bytes.length;
return bytes;
},
lookChar: function Stream_lookChar() {
if (this.pos >= this.end)
return null;
@ -161,6 +166,11 @@ var DecodeStream = (function DecodeStreamClosure() {
this.pos = end;
return this.buffer.subarray(pos, end);
},
peekBytes: function DecodeStream_peekBytes(length) {
var bytes = this.getBytes(length);
this.pos -= bytes.length;
return bytes;
},
lookChar: function DecodeStream_lookChar() {
var pos = this.pos;
while (this.bufferLength <= pos) {