Remove FakeStream.
This commit is contained in:
parent
ba95e0b07b
commit
fe8b6b0950
@ -186,45 +186,6 @@ var DecodeStream = (function DecodeStreamClosure() {
|
|||||||
return DecodeStream;
|
return DecodeStream;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
var FakeStream = (function FakeStreamClosure() {
|
|
||||||
function FakeStream(stream) {
|
|
||||||
this.dict = stream.dict;
|
|
||||||
DecodeStream.call(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
FakeStream.prototype = Object.create(DecodeStream.prototype);
|
|
||||||
FakeStream.prototype.readBlock = function FakeStream_readBlock() {
|
|
||||||
var bufferLength = this.bufferLength;
|
|
||||||
bufferLength += 1024;
|
|
||||||
var buffer = this.ensureBuffer(bufferLength);
|
|
||||||
this.bufferLength = bufferLength;
|
|
||||||
};
|
|
||||||
|
|
||||||
FakeStream.prototype.getBytes = function FakeStream_getBytes(length) {
|
|
||||||
var end, pos = this.pos;
|
|
||||||
|
|
||||||
if (length) {
|
|
||||||
this.ensureBuffer(pos + length);
|
|
||||||
end = pos + length;
|
|
||||||
|
|
||||||
while (!this.eof && this.bufferLength < end)
|
|
||||||
this.readBlock();
|
|
||||||
|
|
||||||
var bufEnd = this.bufferLength;
|
|
||||||
if (end > bufEnd)
|
|
||||||
end = bufEnd;
|
|
||||||
} else {
|
|
||||||
this.eof = true;
|
|
||||||
end = this.bufferLength;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.pos = end;
|
|
||||||
return this.buffer.subarray(pos, end);
|
|
||||||
};
|
|
||||||
|
|
||||||
return FakeStream;
|
|
||||||
})();
|
|
||||||
|
|
||||||
var StreamsSequenceStream = (function StreamsSequenceStreamClosure() {
|
var StreamsSequenceStream = (function StreamsSequenceStreamClosure() {
|
||||||
function StreamsSequenceStream(streams) {
|
function StreamsSequenceStream(streams) {
|
||||||
this.streams = streams;
|
this.streams = streams;
|
||||||
|
Loading…
Reference in New Issue
Block a user