UNPKG

compact2string

Version:

Convert BitTorrent compact hostname & port buffer to a string 'hostname:port'

6 lines (4 loc) 162 B
var compact2string = require("../"); var Buffer = require("buffer").Buffer; var iphost = compact2string(new Buffer("0A0A0A05FF80", "hex")); console.log(iphost);