Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/privacyforge/bitphrase
Encode and Decode Bytes to Meaningful Word
https://github.com/privacyforge/bitphrase
Last synced: 7 days ago
JSON representation
Encode and Decode Bytes to Meaningful Word
- Host: GitHub
- URL: https://github.com/privacyforge/bitphrase
- Owner: PrivacyForge
- Created: 2024-08-28T09:00:29.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-28T13:49:45.000Z (3 months ago)
- Last Synced: 2024-09-30T07:14:10.411Z (about 2 months ago)
- Language: TypeScript
- Size: 40 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ByteWorder.js
Encode and Decode Bytes to Meaningful Word
## Encode
```js
const encoded = encodeUint8ArrayToWord(
new Uint8Array([2, 23, 43, 123, 2, 23, 42, 12, 34, 10, 98, 7])
);
console.log(encoded); // عاقبت مهر نر خدایی جهانبان تونیک تبرک
```## Decode
```js
const encoded = "عاقبت مهر نر خدایی جهانبان تونیک تبرک";
const decoded = decodeWordToUint8Array(encoded);
console.log(decoded); // [2, 23, 43, 123, 2, 23, 42, 12, 34, 10, 98, 7]
```