]> git.parisson.com Git - pdf.js.git/commitdiff
moved array allocation to consturctor
authorsbarman <sbarman@L3CWZ5T.(none)>
Wed, 22 Jun 2011 05:53:47 +0000 (22:53 -0700)
committersbarman <sbarman@L3CWZ5T.(none)>
Wed, 22 Jun 2011 05:53:47 +0000 (22:53 -0700)
pdf.js

diff --git a/pdf.js b/pdf.js
index 766ea3b28754a3e1614a7965b4935cd82a0fbaa4..852eb03e7cd321b6d2b32c1bbaa7d709d3a29e10 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -770,6 +770,7 @@ var Ascii85Stream = (function() {
     function constructor(str) {
         this.str = str;
         this.dict = str.dict;
+        this.input = new Uint8Array(5);
         
         DecodeStream.call(this);
     }
@@ -799,7 +800,7 @@ var Ascii85Stream = (function() {
                 buffer[bufferLength + i] = 0;
             this.bufferLength += 4;
         } else {
-            var input = new Uint8Array(5);
+            var input = this.input;
             input[0] = c;
             for (var i = 1; i < 5; ++i){
                 c = str.getByte();