zw 0.2.0

Utility for encoding and decoding text using zero-width characters
Documentation
  • Coverage
  • 100%
    5 out of 5 items documented3 out of 3 items with examples
  • Size
  • Source code size: 11.7 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.13 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 19s Average build duration of successful builds.
  • all releases: 19s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • tje/rs-zw
    0 0 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • tje

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.

Usage

As a module:

use zw;
// ...
let encoded = zw::encode("Hello");
let decoded = zw::decode(&encoded);

As a CLI tool:

zw [-e|--encode] [-d|--decode] [input]

If both -e and -d flags are omitted then conversion direction is guessed based on the first interpreted character.

Reads from stdin if an input string isn't provided in its arguments.

# Shell-ish
zw "Hello" > encoded.txt
cat encoded.txt | zw > decoded.txt

# MacOS clipboard encoding
pbpaste | zw | pbcopy