Zero Width Unicode Standard (ZWUS)

Zero Width Unicode Steganography — hide text inside invisible characters.

npm install zwus

Usage

import zwus from 'zwus';

// Encode & decode strings
const hidden = zwus.encodeString("secret");
const revealed = zwus.decodeToString(hidden);
// "secret"

// Encode & decode number arrays
const encoded = zwus.encodeNumberArray([72, 101, 108]);
const decoded = zwus.decodeToNumberArray(encoded);
// [72, 101, 108]

Base

Higher base = shorter output, but more likely visible in some renderers.

zwus.encodeString("hi", 3)  // default, safest
zwus.encodeString("hi", 6)  // compact
zwus.encodeString("hi", 8)  // most compact

Decode must match the encode base:

zwus.decodeToString(encoded, 6)

Interop

Encoded output is byte-identical to the Rust crate, so you can encode in JS and decode in Rust or vice versa.

License

WTFPL

Description
Zero Width Unicode Standard
Readme 57 KiB
Languages
JavaScript 100%