3.0.0 • Published 2 years ago

decode-encode-binary v3.0.0

Weekly downloads
135
License
MIT
Repository
github
Last release
2 years 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

2 years ago

2.0.6

3 years ago

2.0.5

4 years ago

2.0.4

4 years ago

1.0.3

4 years ago

2.0.3

4 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.4.16

5 years ago

1.4.14

5 years ago

1.4.13

5 years ago

1.4.12

5 years ago

1.4.11

5 years ago

1.4.10

5 years ago

1.4.9

5 years ago

1.4.8

5 years ago

1.4.7

5 years ago

1.4.6

5 years ago

1.4.5

5 years ago

1.4.4

5 years ago

1.4.3

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.24

5 years ago

1.3.23

6 years ago

1.3.22

6 years ago

1.3.21

6 years ago

1.3.20

6 years ago

1.3.19

6 years ago

1.3.18

6 years ago

1.3.17

6 years ago

1.3.16

6 years ago

1.3.15

6 years ago

1.3.14

6 years ago

1.3.13

6 years ago

1.3.12

6 years ago

1.3.10

6 years ago

1.3.9

6 years ago

1.3.8

6 years ago