decode-encode-binary

3.0.0 • Public • Published

decode-encode-binary

A Module/CLI to encode & decode binary numbers

GitHub repo size Total Downloads Line

Installation

Using npm
$ npm install decode-encode-binary
Using Yarn
$ yarn add decode-encode-binary

Using in Terminal

  • The Terminal command is encdec or decenc (both function the same)
  • Using in Terminal requires to have package installed with the --global tag
$ encdec
$ > Enter your input (Binary/Text)
$ > Hi
$ 0100100001101001
$ decenc
$ > Enter your input (Binary/Text)
$ > 0100100001101001
$ Hi

Examples

An example of decoding text from binary numbers

const test = require("decode-encode-binary");
test.decode("0100100001100101011011000110110001101111");

// output: "Hello"

An example of encoding text to binary numbers

const test = require("decode-encode-binary");
test.encode("Hello");

// output: "0100100001100101011011000110110001101111"
  • A binary letter padding can be used by setting boolean as the second parameter
const test = require("decode-encode-binary");
test.encode("Hi", true);

// output: "01001000 01101001"

An example of using determine

const test = require("decode-encode-binary");

test.determine("Hi");
// output: 0100100001101001

test.determine("0100100001101001");
// output: "Hi"

Try on Runkit Star On GitHub Fork On GitHub Line

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.0.05latest

Version History

VersionDownloads (Last 7 Days)Published
3.0.05
2.0.63
2.0.50
2.0.40
1.0.30
2.0.32
2.0.22
2.0.12
2.0.00
1.4.163
1.4.140
1.4.130
1.4.120
1.4.110
1.4.100
1.4.90
1.4.80
1.4.70
1.4.62
1.4.50
1.4.40
1.4.30
1.4.20
1.4.12
1.4.00
1.3.240
1.3.230
1.3.220
1.3.214
1.3.200
1.3.190
1.3.180
1.3.170
1.3.160
1.3.150
1.3.140
1.3.130
1.3.120
1.3.100
1.3.90
1.3.81

Package Sidebar

Install

npm i decode-encode-binary

Weekly Downloads

20

Version

3.0.0

License

MIT

Unpacked Size

7.62 kB

Total Files

5

Last publish

Collaborators

  • thechickienagget