compact2string
Convert bittorrent's compact ip/host binary returned by Trackers to 'hostname:port' string.
Need the reverse of this? Checkout https://github.com/feross/string2compact
Installation
npm install compact2string
Usage
Single compact2string
var compact2string = ;var Buffer = Buffer;var ipport = ;console;
=> "10.10.10.5:65408"
ipport = ;console;
=> "[2a03:2880:2110:9f07:face:b00c::1]:80"
Multiple in same buffer
var hostports = compact2string;console;
=> [ '10.10.10.5:128', '100.56.58.99:28525' ]
IPv6 version: compact2string.multi6()
Licence
(MIT Licence)