/* rb_econv_encoding_to_insert_output
778214
public byte[] encodingToInsertOutput() {
        Transcoding transcoding = lastTranscoding;
        if (transcoding == null) return NULL_STRING;
        Transcoder transcoder = transcoding.transcoder;
        return transcoder.compatibility.isEncoder() ? transcoder.source : transcoder.destination;
    }
219188
function ecc200encode(&$t, &$tl, $s, $sl, $e) {
        // start in ASCII encoding mode
        $enc = 'a';
        $tp = 0;
        $sp = 0;
        $p = 0;
        $v = 0;
        $w = 0;

        $oldErrorReporting = error_reporting(0);

        //does not work, but is said to be optional, doesn't work in the JS code either because of a typo
        //        if ($e['encodingLength'] < $sl)
        //        {
        //            die("Encoding string too short");
        //            return 0;
        //        }

        // do the encoding
        while ($sp < $sl && $tp < $tl) {
            // suggest new encoding
            $newenc = $enc;
            if ($tl - $tp <= 1 && ($enc == 'c' || $enc == 't') || $tl - $tp <= 2 && $enc == 'x')
                // auto revert to ASCII
                $enc = 'a';
            //$this->debug("encoding: " + e.encoding);
            //$this->debug("encoding[sp]: " + e.encoding[sp]);
            $newenc = strtolower($e['encoding'][$sp]);
            switch ($newenc) {
                // encode character
                case 'c':
                    // C40
                case 't':
                    // Text
                case 'x': {
                    // X12
                    $out = array_fill(0, 6, 0);
                    $p = 0;
                    $s2 = "!\"#$%&'()*+,-./:;<=>?@[\\]^_\232";
                    $s3 = "";
                    if ($newenc == 'c') {
                        $en = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
                        $s3 = "`abcdefghijklmnopqrstuvwxyz{|}~\177";
                    }
                    if ($newenc == 't') {
                        $en = " 0123456789abcdefghijklmnopqrstuvwxyz";
                        $s3 = "`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~\177";
                    }
                    if ($newenc == 'x')
                        $en = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\r*>";
                    do {
                        $c = $s{$sp++};
                        if ($c & 0x80) {
                            if ($newenc == 'x') {
                                die("Cannot encode char in X12: " . $c);
                                return 0;
                            }
                            $c = $c & 0x7f;
                            $out[$p++] = 1;
                            $out[$p++] = 30;
                        }
                        $w = strpos($en, $c);
                        if ($w !== false)
                            $out[$p++] = ($w + 3) % 40;
                        else {
                            if ($newenc == 'x') {
                                die("Cannot encode char in X12: " . $c);
                                return 0;
                            }
                            if (ord($c) < 32) {
                                // shift 1 XXX
                                $out[$p++] = 0;
                                $out[$p++] = $c;
                            } else {
                                $w = strpos($s2, $c);
                                if ($w !== false) {
                                    // shift 2
                                    $out[$p++] = 1;
                                    $out[$p++] = $w;
                                } else {
                                    $w = strpos($s3, $c);
                                    if ($w !== false) {
                                        $out[$p++] = 2;
                                        $out[$p++] = $w;
                                    } else {
                                        die("Should not happen. Could not encode: " . $c);
                                        return 0;
                                    }
                                }
                            }
                        }
                        if ($p == 2 && $tp + 2 == $tl && $sp == $sl)
                            // shift 1 $pad at end
                            $out[$p++] = 0;
                        while ($p >= 3) {
                            $v = $out[0] * 1600 + $out[1] * 40 + $out[2] + 1;
                            if ($enc != $newenc) {
                                if ($enc == 'c' || $enc == 't' || $enc == 'x')
                                    // escape C40/text/X12
                                    $t[$tp++] = 254;
                                elseif ($enc == 'x')
                                    // escape EDIFACT
                                    $t[$tp++] = 0x7C;
                                if ($newenc == 'c')
                                    $t[$tp++] = 230;
                                if ($newenc == 't')
                                    $t[$tp++] = 239;
                                if ($newenc == 'x')
                                    $t[$tp++] = 238;
                                $enc = $newenc;
                            }
                            $t[$tp++] = ($v >> 8);
                            $t[$tp++] = ($v & 0xFF);
                            $p -= 3;
                            $out[0] = $out[3];
                            $out[1] = $out[4];
                            $out[2] = $out[5];
                        }
                    } while ($p && $sp < $sl);
                }
                break;
                case 'e': {
                    // EDIFACT
                    $out = array_fill(0, 4, 0);
                    $p = 0;
                    if ($enc != $newenc) {
                        // can only be from C40/Text/X12
                        $t[$tp++] = 254;
                        $enc = 'a';
                    }
                    while ($sp < $sl && strtolower($e['encoding'][$sp]) == 'e' && $p < 4)
                        $out[$p++] = ord($s{$sp++});
                    if ($p < 4) {
                        $out[$p++] = 0x1F;
                        $enc = 'a';
                    }
                    // termination
                    $t[$tp] = (($s{0} & 0x3F) << 2);
                    $ttp = $tp++;
                    $t[$ttp] = $t[$ttp] | (($s{1} & 0x30) >> 4);
                    $t[$tp] = (($s{1} & 0x0F) << 4);
                    if ($p == 2)
                        $tp++;
                    else {
                        $ttp = $tp++;
                        $t[$ttp] = $t[$ttp] | (($s[2] & 0x3C) >> 2);
                        $t[$tp] = (($s{2} & 0x03) << 6);
                        $ttp = $tp++;
                        $t[$ttp] = $t[$ttp] | ($s{3} & 0x3F);
                    }
                }
                break;
                case 'a':
                    // ASCII
                    if ($enc != $newenc) {
                        if ($enc == 'c' || $enc == 't' || $enc == 'x')
                            // escape C40/text/X12
                            $t[$tp++] = 254;
                        else
                            // escape EDIFACT
                            $t[$tp++] = 0x7C;
                    }
                    $enc = 'a';
                    if ($sl - $sp >= 2 && $this->isDigit($s{$sp}) && $this->isDigit($s{$sp + 1})) {
                        $t[$tp++] = (ord($s{$sp}) - ord('0')) * 10 + ord($s{$sp + 1}) - ord('0') + 130;
                        $sp += 2;
                    } elseif (ord($s{$sp}) > 127) {
                        $t[$tp++] = 235;
                        $t[$tp++] = ord($s{$sp++}) - 127;
                    } else
                        $t[$tp++] = ord($s{$sp++}) + 1;
                    break;
                case 'b': {
                    // Binary
                    // how much to encode
                    $l = 0;
                    if ($encoding) {
                        for ($p = $sp; $p < $sl && strtolower($e['encoding'][$p]) == 'b'; $p++)
                            $l++;
                    }
                    // base256
                    $t[$tp++] = 231;
                    if ($l < 250)
                        $t[$tp++] = $l;
                    else {
                        $t[$tp++] = 249 + floor(l / 250);
                        $t[$tp++] = ($l % 250);
                    }
                    while ($l-- && $tp < $tl) {
                        // see annex H
                        $t[$tp] = ord($s{$sp++}) + ((($tp + 1) * 149) % 255) + 1;
                        $tp++;
                    }
                    // reverse to ASCII at end
                    $enc = 'a';
                }
                break;
                default:
                    die("Unknown encoding: " . $newenc);
                    // failed
                    return 0;
            }
        }
        if ($tp < $tl && $enc != 'a') {
            if ($enc == 'c' || $enc == 'x' || $enc == 't')
                // escape X12/C40/Text
                $t[$tp++] = 254;
            else
                // escape EDIFACT
                $t[$tp++] = 0x7C;
        }
        if ($tp < $tl)
            // $pad
            $t[$tp++] = 129;
        while ($tp < $tl) {
            // more $padding
            // see Annex H
            $v = 129 + ((($tp + 1) * 149) % 253) + 1;
            if ($v > 254)
                $v -= 254;
            $t[$tp++] = $v;
        }

        error_reporting($oldErrorReporting);

        if ($tp > $tl || $sp < $sl) // did not fit
            return 0;
        // OK
        return $tp;
    }
1183414
function __encode_utf8(text) {

        // Fill buffer with UTF-8
        for (var i=0; i<text.length; i++) {
            var codepoint = text.charCodeAt(i);
            __append_utf8(codepoint);
        }

        // Flush buffer
        if (length > 0) {
            var out_buffer = buffer.subarray(0, length);
            length = 0;
            return out_buffer;
        }

    }
286149
def encode_dump(dump)
      dump = dump.read unless dump.is_a?(String)

      enc = CharlockHolmes::EncodingDetector.detect(dump)
      if enc[:encoding] != 'UTF-8'
        puts "Converting `#{enc[:encoding]}` to `UTF-8`".yellow
        dump = CharlockHolmes::Converter.convert dump, enc[:encoding], 'UTF-8'
      end
      dump
    end
67857
function htmlEncode($html, $in = null, $out = null, $mode = 'auto')
    {
        $valid = array(
            'auto',
            'iconv',
            'mb_convert_encoding'
        );
        if (! isset($out)) {
            $out = 'UTF-8';
        }
        if (! in_array($mode, $valid)) {
            user_error('invalid mode, mode=' . $mode, E_USER_ERROR);
        }
        $if = function_exists('mb_convert_encoding');
        $if = $if && ($mode == 'auto' || $mode == 'mb_convert_encoding');
        $func = null;
        if (function_exists('iconv') && ($mode == 'auto' || $mode == 'iconv')) {
            $func = 'iconv';
        } elseif ($if) {
            $func = 'mb_convert_encoding';
        } else {
            user_error('encode failed, php extension not found', E_USER_ERROR);
        }
        $pattern = '/(<meta[^>]*?charset=(["\']?))([a-z\d_\-]*)(\2[^>]*?>)/is';
        if (! isset($in)) {
            $n = preg_match($pattern, $html, $in);
            if ($n > 0) {
                $in = $in[3];
            } else {
                if (function_exists('mb_detect_encoding')) {
                    $in = mb_detect_encoding($html);
                } else {
                    $in = null;
                }
            }
        }
        if (isset($in)) {
            $old = error_reporting(error_reporting() & ~ E_NOTICE);
            $html = call_user_func($func, $in, $out . '//IGNORE', $html);
            error_reporting($old);
            $html = preg_replace($pattern, "\\1$out\\4", $html, 1);
        } else {
            user_error('source encoding is unknown', E_USER_ERROR);
        }
        return $html;
    }
388099
function IconvLiteDecoderStream(conv, options) {
    this.conv = conv;
    options = options || {};
    options.encoding = this.encoding = 'utf8'; // We output strings.
    Transform.call(this, options);
}
383508
function encodeFloat(value) {
    let buffer = new ByteBuffer();
    buffer.littleEndian = true;
    buffer.limit = 8;
    if (value === null) {
        return buffer;
    }
    return buffer.writeFloat(value);
}
47152
function utf8Text(buf, i) {
  var total = utf8CheckIncomplete(this, buf, i);
  if (!this.lastNeed) return buf.toString('utf8', i);
  this.lastTotal = total;
  var end = buf.length - (total - this.lastNeed);
  buf.copy(this.lastChar, 0, end);
  return buf.toString('utf8', i, end);
}
621081
function rstr2binb(input) {
    var i, l = input.length * 8,
      output = Array(input.length >> 2),
      lo = output.length;
    for (i = 0; i < lo; i += 1) {
      output[i] = 0;
    }
    for (i = 0; i < l; i += 8) {
      output[i >> 5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);
    }
    return output;
  }
407337
function encodeString(value) {
    let buffer = new ByteBuffer();
    if (value === null) {
        return buffer;
    }
    return buffer.writeVString(value);
}
464948
function encodeAttachmentMSTTransfer(buffer, offset, symbol, quantity) {
    if (symbol == undefined)
        throw Error('Specify output asset');
    if (quantity == undefined)
        throw Error('Specify output quanity');
    offset = buffer.writeUInt32LE(Constants.MST.STATUS.TRANSFER, offset);
    offset += encodeString(buffer, symbol, offset);
    offset = bufferutils.writeUInt64LE(buffer, quantity, offset);
    return offset;
}
594531
static function outputCharsetToPhpCharset($in)
    {
        $out = $in;
        switch ($in) {
            case "None":$out = false;
                break;
            case "UTF8":$out = "UTF-8";
                break;
            case "ISO-8859-1":
            case "ISO-8859-2":
            case "ISO-8859-3":
            case "ISO-8859-4":
            case "ISO-8859-5":
            case "ISO-8859-6":
            case "ISO-8859-7":
            case "ISO-8859-8":
            case "ISO-8859-8-I":
            case "ISO-8859-9":
            case "ISO-8859-10":
            case "ISO-8859-11":
            case "ISO-8859-12":
            case "ISO-8859-13":
            case "ISO-8859-14":
            case "ISO-8859-15":
            case "ISO-8859-16":$out = $in;
                break;
            case "GB18030":
            case "GB2312":
            case "GBK":
            case "Big5":
            case "BIG5":$out = strtolower($in);
                break;
            case "Windows-1250":$out = "Windows-1250";
                break;
            case "Windows-1251":$out = "Windows-1251";
                break;
            case "Windows-1252":$out = "Windows-1252";
                break;
            case "Windows-1253":$out = "Windows-1253";
                break;
            case "Windows-1254":$out = "Windows-1254";
                break;
            case "Windows-1255":$out = "Windows-1255";
                break;
            case "Windows-1256":$out = "Windows-1256";
                break;
            case "Windows-1257":$out = "Windows-1257";
                break;
            case "Windows-1258":$out = "Windows-1258";
                break;
            case "Shift_JIS":$out = "shift-jis";
                break;
            case "TIS-620":$out = "tis-620";
                break;
            default:$out = false;
        }

        return $out;
    }
1209810
function str_serialize(result, key, value) {
  // encode newlines as \r\n cause the html spec says so
  value = value.replace(/(\r)?\n/g, '\r\n');
  value = encodeURIComponent(value);

  // spaces should be '+' rather than '%20'.
  value = value.replace(/%20/g, '+');
  return result + (result ? '&' : '') + encodeURIComponent(key) + '=' + value;
}
454096
public static Vec numericToStringVec(Vec src) {
    if (src.isCategorical() || src.isUUID())
      throw new H2OIllegalValueException("Cannot convert a non-numeric column"
          + " using numericToStringVec() ",src);
    Vec res = new MRTask() {
      @Override
      public void map(Chunk chk, NewChunk newChk) {
        if (chk instanceof C0DChunk) { // all NAs
          for (int i=0; i < chk._len; i++)
            newChk.addNA();
        } else {
          for (int i=0; i < chk._len; i++) {
            if (!chk.isNA(i))
              newChk.addStr(PrettyPrint.number(chk, chk.atd(i), 4));
            else
              newChk.addNA();
          }
        }
      }
    }.doAll(Vec.T_STR, src).outputFrame().anyVec();
    assert res != null;
    return res;
  }
615787
function(preScripture){

      this.stdin.resume();
      this.stdin.setEncoding('utf8');
      this.stdin.on('data', this.checkInput.bind(this));

      var _fillStrBlue = '................................................................................';
      var _lengthOfSprite = _fillStrBlue.length;
      var _fillerStrLengthForConsoleWidth = Math.floor(_lengthOfSprite / 2);

      var _fillerStrForConsolePadding = '';

      for(var oo = 0; oo < _fillerStrLengthForConsoleWidth; oo++){
        _fillerStrForConsolePadding += '.';
      }

      util.puts("Loading PatsyJS...".bold);
      util.print('\n'+
      _fillerStrForConsolePadding.inverse.blue + '................................................................................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '................................................................................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '................................................................................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '................................................................................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '......................................................'.inverse.blue + ',:::::::,,,,'.inverse.yellow + '..............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '................................................'.inverse.blue + ',,::'.inverse.yellow + '~~~~~~======'.inverse.white + '+=,'.inverse.yellow + '.............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.........................,'.inverse.blue + '$$~I+'.inverse.yellow + '..............'.inverse.blue + ',::'.inverse.yellow + '~~'.inverse.white + '::::::::::::::'.white + '~'.inverse.white + '+=,'.inverse.yellow + '............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '...................'.inverse.blue + '++Z7$7=~~~+?7ZOZZO?'.inverse.yellow + '.....'.inverse.blue + ',:'.inverse.yellow + '~~'.inverse.white + '::::::::::~~~~::'.white + '::'.inverse.white + '+?:'.inverse.yellow + '............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '................'.inverse.blue + 'OZ$~?~'.inverse.yellow + ':::,,:,,,,,,'.inverse.white + '::~IZZ8Z:'.inverse.yellow + '~:'.inverse.white + ':::::::::~:~~~~~:'.white + '::'.inverse.white + '~II:,'.inverse.yellow + '...........'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '..............'.inverse.blue + 'ZZZ~'.inverse.yellow + '::,:,,,,,.,.....,,,,'.inverse.white + '::=78~~'.inverse.yellow + '::::::::::::~~~:'.white + '::'.inverse.white + '~IZI:,'.inverse.yellow + '...........'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '...........'.inverse.blue + 'I:IZO~'.inverse.yellow + ':,,,.,,,,,'.inverse.white + '::~:'.white + ',,,,...,,,'.inverse.white + '::78,'.inverse.yellow + ':::::::::::::'.white + ':::'.inverse.white + '=7ZZI:,'.inverse.yellow + '...........'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '...........'.inverse.blue + '=IZO~'.inverse.yellow + ':,,,.,'.inverse.white + '~~~~~~==~=~~~~'.white + ':,,...,'.inverse.white + ':~DO,'.inverse.yellow + ',,'.inverse.white + '::::::'.white + ':::~'.inverse.white + '=IZZZZ?:'.inverse.yellow + '............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '...........'.inverse.blue + '~Z7$'.inverse.yellow + ':,,,,,'.inverse.white + '=~~=~========~=~~~~'.white + '...,,'.inverse.white + ':IO~'.inverse.yellow + '~~~~~~='.inverse.white + '?I$OOZZZZ$=,'.inverse.yellow + '............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '..........'.inverse.blue + 'Z$O$O~'.inverse.yellow + ':,,,'.inverse.white + '~=~~~==============~~'.white + ',,,,'.inverse.white + '::$O$ZZZOOOOOOOOZZZZ?:'.inverse.yellow + '.............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '..........'.inverse.blue + 'ZO$$Z~'.inverse.yellow + ':,,,'.inverse.white + '=~~~~~~==============~'.white + ':,,'.inverse.white + '::~OOZOOZZOOOOOOOOZ$~'.inverse.yellow + ','.inverse.grey + '.............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.........'.inverse.blue + '~ZOZOO7'.inverse.yellow + ':,,,'.inverse.white + '=~~~~~~~~=============~'.white + ':,,,'.inverse.white + ':~OZZZOOOOOOOOOOO+'.inverse.yellow + ','.inverse.grey + '..............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.........'.inverse.blue + 'O8OOOZZ'.inverse.yellow + '::,,:'.inverse.white + '~~~~~~~~~====~~=======~'.white + ',,,,'.inverse.white + '~IZOOOOOOOOOZOZ?:'.inverse.yellow + ',,'.inverse.grey + '.............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.........'.inverse.blue + 'NZ$788ZI'.inverse.yellow + ':,,,'.inverse.white + '~~~~~~~~~~=~~~~~======~'.white + ',.,,'.inverse.white + ':~OIO8888888Z7+'.inverse.yellow + '~~:::,,,,'.inverse.grey + '........'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '........'.inverse.blue + '=Z$Z8OZ$$7'.inverse.yellow + ':,,,'.inverse.white + '~~~~~~~~=~~~~~~~====~~'.white + ',,,,'.inverse.white + '::ZODDDDD8Z7+='.inverse.yellow + '~~~~::::::,,,'.inverse.grey + '.....'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '........'.inverse.blue + ':$8$OZZOZO7'.inverse.yellow + ':,,,,'.inverse.white + '~~~~~~~~~~~~~~===~~~'.white + ',.,,'.inverse.white + ':~ZO?IIIII?+='.inverse.yellow + '~~~::::::,,,,'.inverse.grey + '......'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.......'.inverse.blue + '+?Z$O$OZZZOOO'.inverse.yellow + ':,,,,:'.inverse.white + '~~~~~~~~~~~~=~~~~'.white + ',.,,,'.inverse.white + ':~ZI'.inverse.yellow + '::::::::::,,,,,,'.inverse.grey + '............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.........'.inverse.blue + 'Z78ZO88OZ7$$='.inverse.yellow + ':,,,,'.inverse.white + '~~~~~~~~=~~~~~'.white + '::.,,,,'.inverse.white + ':7Z='.inverse.yellow + ',,,,,,,,,,,,,,,'.inverse.grey + '.............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.........'.inverse.blue + ':OZ8ZZ8ZZ$?$$$'.inverse.yellow + ':,,,,.,,,'.inverse.white + ':::=::'.white + '...,..,,'.inverse.white + '::~ZI'.inverse.yellow + ',,,,,,,,,,,,,,,'.inverse.grey + '..............'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.........'.inverse.blue + '.7ZZO88OZ8ZOOZOO'.inverse.yellow + ':,,,,,.....,,,,,,,,,'.inverse.white + '::=ZI'.inverse.yellow + '......'.inverse.blue + ',.,,,,,'.inverse.grey + '.................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '...........'.inverse.blue + 'IZ$88OOOOZZ88Z7OZ~'.inverse.yellow + ':,,,,,,,,,,,'.inverse.white + '::::$OZZ:'.inverse.yellow + '..............................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '............'.inverse.blue + 'ZZZZO$Z$OOOZOO$77OZI77+'.inverse.yellow + ':::ZOOOZZZZ$8'.inverse.yellow + '................................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '............'.inverse.blue + '+878$$ZZDZZOOZZZOO$ZOOZO7Z7$$Z$OO7?'.inverse.yellow + '.................................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.....'.inverse.blue + ',,,,,,,,,'.inverse.grey + 'Z$OZOZ8ZOOO$O$O7Z$OO$$$8OOOOZZZ7'.inverse.yellow + '..................................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '..'.inverse.blue + ',,,,,,,,,,,,,,'.inverse.grey + 'OOO8Z88OZD8OOO$8Z8$8OZZO7Z7O'.inverse.yellow + '....................................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '..'.inverse.blue + ',,,,,,,,,,,,:~+?'.inverse.grey + 'OD8D$O888OOOOZ$88OZ$Z8O~~'.inverse.yellow + '~::,,'.inverse.grey + '................................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '...'.inverse.blue + ',,,,,,,,,~=+++???'.inverse.grey + '8D8DD8NDDDO88NOD8?7==='.inverse.yellow + '~~~:::::,,,'.inverse.grey + '...........................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '.......'.inverse.blue + ',,,::=++??IZ78O'.inverse.grey + '8NNDDNMNM8MZZ$7I?+'.inverse.yellow + '==~~~::::,,,,,,,,'.inverse.grey + '.......................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '............'.inverse.blue + ',:=+??I7$$$'.inverse.grey + 'ZZZOOO8OOOZ$7I?+'.inverse.yellow + '=~~::::,,,,,,,,,'.inverse.grey + '.........................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue +
      _fillerStrForConsolePadding.inverse.blue + '...............'.inverse.blue + ',,:~~==============~~~~:::::,,,,,,'.inverse.grey + '...............................'.inverse.blue + _fillerStrForConsolePadding.inverse.blue + '\n'.inverse.blue);


      if ((Array.isArray(preScripture)) && (preScripture.length > 0)) {
        for (var i = 0; i < preScripture.length; i++) {
          this.scripture.print(preScripture[i]);
        }
      }

      this.scripture.print('[King Arthur]'.magenta + ': Come Patsy, my trusty servant!!');
      this.scripture.print('[Patsy]'.yellow + ': <banging two half coconuts together> ');

      try{
        var patsy = this;
        /**
         * Require project from the library
         *
         * @var     Object
         * @source  patsy
         */
        var project = require('./project')(opts);
        project.check(patsy);
      } catch(e){
        console.log('>> PatsyStartException'.red + ':', e);
      }
    }
578296
function encodeBuffer(buf, options, cb) {
  if(typeof options === 'function') {
    cb = options;
    options = {};
  }

  try {
    buf = bufferUtils.toArrayLike(buf);

    if(!options.hasOwnProperty('width') || !options.hasOwnProperty('height')) {
      return cb(new Error('Provide width & height of the buffer'));
    }

    if(hasWorker) {
      const wr = require('webworkify')(encodeWorker);

      wr.onmessage = ({ data: msg }) => {
        const err = msg.err ? new Error(msg.err) : undefined;
        cb(err, msg.result);
      };

      const msg = {
        buf: buf,
        options: options
      };

      if (options.transferable) {
        wr.postMessage(msg, [ buf ]);
      } else {
        wr.postMessage(msg);
      }
    } else {
      encode(buf, options, cb);
    }
  } catch(err) {
    cb(err);
  }
}
760237
function encodeVarInt(value) {
    var bytes = [], cursor, length, i;

    do {
        bytes.push(value & 0x7F);
        value >>= 7;
    } while (value > 0);

    length = bytes.length;
    cursor = new BufferCursor(new buffer.Buffer(length));

    for (i = length - 1; i >= 0; i -= 1) {
        if (i > 0) {
            bytes[i] |= 0x80;
        }

        cursor.writeUInt8(bytes[i]);
    }

    return cursor.buffer;
}