From fe8b6b0950dbf6df6046240263c1723eb6aaa3c6 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 4 Mar 2014 18:07:15 -0800 Subject: [PATCH] Remove FakeStream. --- src/core/stream.js | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/src/core/stream.js b/src/core/stream.js index 696833f2e..18fd41dfd 100644 --- a/src/core/stream.js +++ b/src/core/stream.js @@ -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;