dist/jspdf.node.debug.js
function createZlibHeader(bytes, level) {
    /*
     * @see http://www.ietf.org/rfc/rfc1950.txt for zlib header
     */
    var cm = 8;
    var cinfo = Math.LOG2E * Math.log(0x8000) - 8;
    var cmf = cinfo << 4 | cm;
    var hdr = cmf << 8;
    var flevel = Math.min(3, (level - 1 & 0xff) >> 1);
    hdr |= flevel << 6;
    hdr |= 0; //FDICT

    hdr += 31 - hdr % 31;
    return [cmf, hdr & 0xff & 0xff];
  }
function createZlibHeader(bytes, level) {
    /*
     * @see http://www.ietf.org/rfc/rfc1950.txt for zlib header
     */
    var cm = 8;
    var cinfo = Math.LOG2E * Math.log(0x8000) - 8;
    var cmf = cinfo << 4 | cm;
    var hdr = cmf << 8;
    var flevel = Math.min(3, (level - 1 & 0xff) >> 1);
    hdr |= flevel << 6;
    hdr |= 0; //FDICT

    hdr += 31 - hdr % 31;
    return [cmf, hdr & 0xff & 0xff];
  }
/*
@see http://www.w3.org/TR/PNG-Chunks.html

Color    Allowed      Interpretation
Type     Bit Depths
0       1,2,4,8,16  Each pixel is a grayscale sample.
2       8,16        Each pixel is an R,G,B triple.
3       1,2,4,8     Each pixel is a palette index;
a PLTE chunk must appear.
4       8,16        Each pixel is a grayscale sample,
followed by an alpha sample.
6       8,16        Each pixel is an R,G,B triple,
followed by an alpha sample.
 /*
PNG filter method types

@see http://www.w3.org/TR/PNG-Filters.html
@see http://www.libpng.org/pub/png/book/chapter09.html

This is what the value 'Predictor' in decode params relates to

15 is "optimal prediction", which means the prediction algorithm can change from line to line.
In that case, you actually have to read the first byte off each line for the prediction algorthim (which should be 0-4, corresponding to PDF 10-14) and select the appropriate unprediction algorithm based on that byte.

0       None
1       Sub
2       Up
3       Average
4       Paeth