Merge pull request #2292 from saebekassebil/mozilla
Implement NullStream, fixes #1832
This commit is contained in:
commit
51e27537b4
@ -230,6 +230,9 @@ var Parser = (function ParserClosure() {
|
|||||||
return stream;
|
return stream;
|
||||||
},
|
},
|
||||||
makeFilter: function Parser_makeFilter(stream, name, length, params) {
|
makeFilter: function Parser_makeFilter(stream, name, length, params) {
|
||||||
|
if (stream.dict.get('Length') === 0) {
|
||||||
|
return new NullStream(stream);
|
||||||
|
}
|
||||||
if (name == 'FlateDecode' || name == 'Fl') {
|
if (name == 'FlateDecode' || name == 'Fl') {
|
||||||
if (params) {
|
if (params) {
|
||||||
return new PredictorStream(new FlateStream(stream), params);
|
return new PredictorStream(new FlateStream(stream), params);
|
||||||
|
@ -2350,3 +2350,12 @@ var LZWStream = (function LZWStreamClosure() {
|
|||||||
return LZWStream;
|
return LZWStream;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
var NullStream = (function NullStreamClosure() {
|
||||||
|
function NullStream() {
|
||||||
|
Stream.call(this, new Uint8Array(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
NullStream.prototype = Stream.prototype;
|
||||||
|
|
||||||
|
return NullStream;
|
||||||
|
})();
|
||||||
|
Loading…
Reference in New Issue
Block a user