Expand description
ZW
Utility for encoding and decoding text using zero-width characters.
How it works
Subject text is first converted to its binary representation (e.g. “foo” ->
“011001100110111101101111”), then each digit is replaced with a zero-width
character (specifically: U+200B
and U+200C
). Decoding is simply the
inverse of the same flow of operations.
Example usage
use zw;
let encoded = zw::encode("Hello");
let decoded = zw::decode(&encoded);
assert_ne!("Hello", &encoded);
assert_eq!("Hello", &decoded);