Remove FakeStream.

This commit is contained in:
Nicholas Nethercote 2014-03-04 18:07:15 -08:00
parent ba95e0b07b
commit fe8b6b0950

View File

@ -186,45 +186,6 @@ var DecodeStream = (function DecodeStreamClosure() {
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() {
function StreamsSequenceStream(streams) {
this.streams = streams;