lib/base62.js
function encode(buf) {
	if (buf.length != 8) {
		throw new TypeError("Buffer must be length 8");
	}

	var num = new UInt64(buf.readUInt32BE(4), buf.readUInt32BE(0));
	var str = "";
	do {
		num.div(SIXTY_TWO);
		str = CHARS[num.remainder] + str;
	} while (num.greaterThan(ZERO));

	return str;
}
function encode(buf) {
	if (buf.length != 8) {
		throw new TypeError("Buffer must be length 8");
	}

	var num = new UInt64(buf.readUInt32BE(4), buf.readUInt32BE(0));
	var str = "";
	do {
		num.div(SIXTY_TWO);
		str = CHARS[num.remainder] + str;
	} while (num.greaterThan(ZERO));

	return str;
}
function encode ( buf ) { if ( buf . length != 8 ) { throw new TypeError ( "Buffer must be length 8" ) ; } var num = new UInt64 ( buf . readUInt32BE ( 4 ) , buf . readUInt32BE ( 0 ) ) ; var str = "" ; do { num . div ( SIXTY_TWO ) ; str = CHARS [ num . remainder ] + str ; } while ( num . greaterThan ( ZERO ) ) ; return str ; }
Encodes an 8-byte buffer as base 62.
Encodes an 8 - byte buffer as base 62 .