string2compact

WebJar for string2compact

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

string2compact
Last Version

Last Version

1.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

string2compact
WebJar for string2compact
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/webtorrent/string2compact

Download string2compact

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/string2compact/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>string2compact</artifactId>
    <version>1.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/string2compact/
implementation 'org.webjars.npm:string2compact:1.3.0'
// https://jarcasting.com/artifacts/org.webjars.npm/string2compact/
implementation ("org.webjars.npm:string2compact:1.3.0")
'org.webjars.npm:string2compact:jar:1.3.0'
<dependency org="org.webjars.npm" name="string2compact" rev="1.3.0">
  <artifact name="string2compact" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='string2compact', version='1.3.0')
)
libraryDependencies += "org.webjars.npm" % "string2compact" % "1.3.0"
[org.webjars.npm/string2compact "1.3.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : addr-to-ip-port jar [1.0.1,2)
org.webjars.npm : ipaddr.js jar [1.0.1,2)

Project Modules

There are no modules declared in this project.

string2compact travis npm downloads javascript style guide

Convert 'hostname:port' strings to BitTorrent's compact ip/host binary returned by Trackers

This module is the opposite of compact2string. It works in the browser with browserify. It is used by WebTorrent, and more specifically, the bittorrent-tracker and bittorrent-dht modules.

install

npm install string2compact

usage

single string2compact

var string2compact = require('string2compact')
var compact = string2compact('10.10.10.5:65408')
console.log(compact) // new Buffer('0A0A0A05FF80', 'hex')

tranform multiple into one buffer

var compacts = string2compact([ '10.10.10.5:128', '100.56.58.99:28525' ])
console.log(compacts) // new Buffer('0A0A0A05008064383a636f6d', 'hex')

license

MIT. Copyright (c) Feross Aboukhadijeh and WebTorrent, LLC.

org.webjars.npm

WebTorrent

⚡️⚡️⚡️ Streaming torrent client for the web, Node.js, Mac, Windows, & Linux.

Versions

Version
1.3.0