3.0.0 • Published 5 months ago

decode-encode-binary v3.0.0

Weekly downloads
135
License
MIT
Repository
github
Last release
5 months ago

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

3.0.0

5 months ago

2.0.6

2 years ago

2.0.5

3 years ago

2.0.4

3 years ago

1.0.3

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.4.16

3 years ago

1.4.14

4 years ago

1.4.13

4 years ago

1.4.12

4 years ago

1.4.11

4 years ago

1.4.10

4 years ago

1.4.9

4 years ago

1.4.8

4 years ago

1.4.7

4 years ago

1.4.6

4 years ago

1.4.5

4 years ago

1.4.4

4 years ago

1.4.3

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.24

4 years ago

1.3.23

5 years ago

1.3.22

5 years ago

1.3.21

5 years ago

1.3.20

5 years ago

1.3.19

5 years ago

1.3.18

5 years ago

1.3.17

5 years ago

1.3.16

5 years ago

1.3.15

5 years ago

1.3.14

5 years ago

1.3.13

5 years ago

1.3.12

5 years ago

1.3.10

5 years ago

1.3.9

5 years ago

1.3.8

5 years ago