'use strict';
-var ARCFourCipher = (function aRCFourCipher() {
+var ARCFourCipher = (function arcFourCipher() {
function constructor(key) {
this.a = 0;
this.b = 0;
}
constructor.prototype = {
- encryptBlock: function aRCFourCipherEncryptBlock(data) {
+ encryptBlock: function arcFourCipherEncryptBlock(data) {
var i, n = data.length, tmp, tmp2;
var a = this.a, b = this.b, s = this.s;
var output = new Uint8Array(n);
return constructor;
})();
-var AES128Cipher = (function aES128Cipher() {
+var AES128Cipher = (function aes128Cipher() {
var rcon = new Uint8Array([
0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c,
0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a,
}
constructor.prototype = {
- decryptBlock: function aES128CipherDecryptBlock(data) {
+ decryptBlock: function aes128CipherDecryptBlock(data) {
var i, sourceLength = data.length;
var buffer = this.buffer, bufferLength = this.bufferPosition;
// waiting for IV values -- they are at the start of the stream
return constructor;
})();
-var CCITTFaxStream = (function cCITTFaxStream() {
+var CCITTFaxStream = (function ccittFaxStream() {
var ccittEOL = -2;
var twoDimPass = 0;
constructor.prototype = Object.create(DecodeStream.prototype);
- constructor.prototype.readBlock = function cCITTFaxStreamReadBlock() {
+ constructor.prototype.readBlock = function ccittFaxStreamReadBlock() {
while (!this.eof) {
var c = this.lookChar();
this.buf = EOF;
};
constructor.prototype.addPixels =
- function cCITTFaxStreamAddPixels(a1, blackPixels) {
+ function ccittFaxStreamAddPixels(a1, blackPixels) {
var codingLine = this.codingLine;
var codingPos = this.codingPos;
};
constructor.prototype.addPixelsNeg =
- function cCITTFaxStreamAddPixelsNeg(a1, blackPixels) {
+ function ccittFaxStreamAddPixelsNeg(a1, blackPixels) {
var codingLine = this.codingLine;
var codingPos = this.codingPos;
this.codingPos = codingPos;
};
- constructor.prototype.lookChar = function cCITTFaxStreamLookChar() {
+ constructor.prototype.lookChar = function ccittFaxStreamLookChar() {
if (this.buf != EOF)
return this.buf;
return this.buf;
};
- constructor.prototype.getTwoDimCode = function cCITTFaxStreamGetTwoDimCode() {
+ constructor.prototype.getTwoDimCode = function ccittFaxStreamGetTwoDimCode() {
var code = 0;
var p;
if (this.eoblock) {
return EOF;
};
- constructor.prototype.getWhiteCode = function cCITTFaxStreamGetWhiteCode() {
+ constructor.prototype.getWhiteCode = function ccittFaxStreamGetWhiteCode() {
var code = 0;
var p;
var n;
return 1;
};
- constructor.prototype.getBlackCode = function cCITTFaxStreamGetBlackCode() {
+ constructor.prototype.getBlackCode = function ccittFaxStreamGetBlackCode() {
var code, p;
if (this.eoblock) {
code = this.lookBits(13);
return 1;
};
- constructor.prototype.lookBits = function cCITTFaxStreamLookBits(n) {
+ constructor.prototype.lookBits = function ccittFaxStreamLookBits(n) {
var c;
while (this.inputBits < n) {
if ((c = this.str.getByte()) == null) {
return (this.inputBuf >> (this.inputBits - n)) & (0xFFFF >> (16 - n));
};
- constructor.prototype.eatBits = function cCITTFaxStreamEatBits(n) {
+ constructor.prototype.eatBits = function ccittFaxStreamEatBits(n) {
if ((this.inputBits -= n) < 0)
this.inputBits = 0;
};
return constructor;
})();
-var LZWStream = (function lZWStream() {
+var LZWStream = (function lzwStream() {
function constructor(str, earlyChange) {
this.str = str;
this.dict = str.dict;
constructor.prototype = Object.create(DecodeStream.prototype);
- constructor.prototype.readBits = function lZWStreamReadBits(n) {
+ constructor.prototype.readBits = function lzwStreamReadBits(n) {
var bitsCached = this.bitsCached;
var cachedData = this.cachedData;
while (bitsCached < n) {
return (cachedData >>> bitsCached) & ((1 << n) - 1);
};
- constructor.prototype.readBlock = function lZWStreamReadBlock() {
+ constructor.prototype.readBlock = function lzwStreamReadBlock() {
var blockSize = 512;
var estimatedDecodedSize = blockSize * 2, decodedSizeDelta = blockSize;
var i, j, q;
return constructor;
})();
-var PDFDoc = (function pDFDoc() {
+var PDFDoc = (function pdfDoc() {
function constructor(stream) {
assertWellFormed(stream.length > 0, 'stream must have data');
this.stream = stream;
},
// Find the header, remove leading garbage and setup the stream
// starting from the header.
- checkHeader: function pDFDocCheckHeader() {
+ checkHeader: function pdfDocCheckHeader() {
var stream = this.stream;
stream.reset();
if (find(stream, '%PDF-', 1024)) {
}
// May not be a PDF file, continue anyway.
},
- setup: function pDFDocSetup(ownerPassword, userPassword) {
+ setup: function pdfDocSetup(ownerPassword, userPassword) {
this.checkHeader();
this.xref = new XRef(this.stream,
this.startXRef,
// shadow the prototype getter
return shadow(this, 'numPages', num);
},
- getPage: function pDFDocGetPage(n) {
+ getPage: function pdfDocGetPage(n) {
return this.catalog.getPage(n);
}
};
})();
-var PDFImage = (function pDFImage() {
+var PDFImage = (function pdfImage() {
function constructor(xref, res, image, inline) {
this.image = image;
if (image.getParams) {
return constructor;
})();
-var PDFFunction = (function pDFFunction() {
+var PDFFunction = (function pdfFunction() {
function constructor(xref, fn) {
var dict = fn.dict;
if (!dict)
}
constructor.prototype = {
- constructSampled: function pDFFunctionConstructSampled(str, dict) {
+ constructSampled: function pdfFunctionConstructSampled(str, dict) {
var domain = dict.get('Domain');
var range = dict.get('Range');
var samples = this.getSampleArray(size, outputSize, bps, str);
- this.func = function pDFFunctionFunc(args) {
- var clip = function pDFFunctionClip(v, min, max) {
+ this.func = function pdfFunctionFunc(args) {
+ var clip = function pdfFunctionClip(v, min, max) {
if (v > max)
v = max;
else if (v < min)
return output;
};
},
- getSampleArray: function pDFFunctionGetSampleArray(size, outputSize, bps,
+ getSampleArray: function pdfFunctionGetSampleArray(size, outputSize, bps,
str) {
var length = 1;
for (var i = 0; i < size.length; i++)
}
return array;
},
- constructInterpolated: function pDFFunctionConstructInterpolated(str,
+ constructInterpolated: function pdfFunctionConstructInterpolated(str,
dict) {
var c0 = dict.get('C0') || [0];
var c1 = dict.get('C1') || [1];
for (var i = 0; i < length; ++i)
diff.push(c1[i] - c0[i]);
- this.func = function pDFFunctionConstructInterpolatedFunc(args) {
+ this.func = function pdfFunctionConstructInterpolatedFunc(args) {
var x = args[0];
var out = [];
return out;
};
},
- constructStiched: function pDFFunctionConstructStiched(fn, dict, xref) {
+ constructStiched: function pdfFunctionConstructStiched(fn, dict, xref) {
var domain = dict.get('Domain');
var range = dict.get('Range');
var bounds = dict.get('Bounds');
var encode = dict.get('Encode');
- this.func = function pDFFunctionConstructStichedFunc(args) {
- var clip = function pDFFunctionConstructStichedFuncClip(v, min, max) {
+ this.func = function pdfFunctionConstructStichedFunc(args) {
+ var clip = function pdfFunctionConstructStichedFuncClip(v, min, max) {
if (v > max)
v = max;
else if (v < min)
return fns[i].func([v2]);
};
},
- constructPostScript: function pDFFunctionConstructPostScript() {
+ constructPostScript: function pdfFunctionConstructPostScript() {
TODO('unhandled type of function');
- this.func = function pDFFunctionConstructPostScriptFunc() {
+ this.func = function pdfFunctionConstructPostScriptFunc() {
return [255, 105, 180];
};
}