2026-03-27 16:18:57 -07:00
2026-03-27 00:51:19 -07:00
2026-03-27 16:18:57 -07:00
2026-03-27 00:49:49 -07:00
2026-03-27 00:49:12 -07:00

Zero Width Unicode Standard (ZWUS)

Zero Width Unicode Steganography — hide text inside invisible characters.

[dependencies]
zwus = "0.1"

Usage

use zwus::Zwus;

// Encode & decode strings
let hidden = Zwus::encode_string("secret");
let revealed = Zwus::decode_to_string(&hidden);
assert_eq!(revealed, "secret");

// Encode & decode number arrays
let encoded = Zwus::encode_number_array(&[72, 101, 108]);
let decoded = Zwus::decode_to_number_array(&encoded);
assert_eq!(decoded, vec![72, 101, 108]);

Base

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

Zwus::encode_string_with_base("hi", 3); // default, safest
Zwus::encode_string_with_base("hi", 6); // compact
Zwus::encode_string_with_base("hi", 8); // most compact

Decode must match the encode base:

Zwus::decode_to_string_with_base(&encoded, 6);

Embedded in visible text

Non-ZWUS characters are automatically ignored during decoding, so hidden payloads survive being mixed into normal text.

let hidden = Zwus::encode_string("secret");
let carrier = format!("nothing to see here{hidden}, move along");
let extracted = Zwus::decode_to_string(&carrier);
assert_eq!(extracted, "secret");

Full Unicode support

Handles emoji and all of Unicode — anything char can represent.

let encoded = Zwus::encode_string("hello 🦀🔥");
let decoded = Zwus::decode_to_string(&encoded);
assert_eq!(decoded, "hello 🦀🔥");

Interop

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

License

WTFPL

Description
Zero Width Unicode Standard - Crate
Readme WTFPL 68 KiB
Languages
Rust 100%