|
|
@ -155,8 +155,15 @@ var ChunkedStream = (function ChunkedStreamClosure() { |
|
|
|
if (pos >= this.end) { |
|
|
|
if (pos >= this.end) { |
|
|
|
return -1; |
|
|
|
return -1; |
|
|
|
} |
|
|
|
} |
|
|
|
this.ensureByte(pos); |
|
|
|
var byte = this.bytes[pos]; |
|
|
|
return this.bytes[this.pos++]; |
|
|
|
if (byte === 0) { |
|
|
|
|
|
|
|
// |byte| might be zero, because the corresponding chunk has not been
|
|
|
|
|
|
|
|
// loaded yet. In this case, this.ensureByte(pos) will throw an
|
|
|
|
|
|
|
|
// exception and nothing is returned.
|
|
|
|
|
|
|
|
this.ensureByte(pos); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.pos++; |
|
|
|
|
|
|
|
return byte; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getUint16: function ChunkedStream_getUint16() { |
|
|
|
getUint16: function ChunkedStream_getUint16() { |
|
|
|