mirror of
https://github.com/planetrenox/inzerosight.git
synced 2026-09-18 10:05:44 +00:00
docs: update ZWUS guide
Co-authored-by: gemini-3.8-flash <noreply@google.com>
This commit is contained in:
36
docs/zwus.md
36
docs/zwus.md
@@ -1,39 +1,19 @@
|
||||
# ZWUS Standards & Bases
|
||||
|
||||
Choosing the right ZWUS base involves balancing **payload size** against **platform compatibility**.
|
||||
Choosing the right ZWUS base depends on platform compatibility.
|
||||
|
||||
## Choosing the Optimal Base
|
||||
**ZWUS-7** stands for Zero Width Unicode Standard Base 7. It's newer and should be used instead of ZWUS-6 in almost all situations that are compatible. When encoding, it is ~34% more space efficient compared to ZWUS-6, especially when encoding English. In almost all cases, I've personally found ZWUS-7 is compatible everywhere ZWUS-6 is, so use ZWUS-7.
|
||||
|
||||
- **ZWUS-7:**
|
||||
Ranks printable ASCII characters by frequency so common English letters and spaces use short values. It is the default for casual text.
|
||||
|
||||
- **Compatibility Trade-off:**
|
||||
The higher the base, the larger the alphabet of zero-width Unicode characters required. Certain messaging apps, web services, or platforms may strip, sanitize, or fail to hide some of these characters properly (sometimes rendering visible space or placeholder boxes). If a platform alters or rejects certain characters, lower bases like **ZWUS-6** or **ZWUS-3** offer higher compatibility by restricting the alphabet to a smaller, safer subset of zero-width characters.
|
||||
**ZWUS-3** is compatible on Twitter (X), but because of Twitter's character limit, it's kinda limiting. If there is demand, I could create a new standard that uses fewer characters for Twitter—just open an issue and let me know if that's what you want.
|
||||
|
||||
> **Developer Advice:**
|
||||
> - **ZWUS-7:** Use it for compact everyday English text.
|
||||
> - **ZWUS-6:** Use it when a platform does not preserve ZWUS-7's additional character.
|
||||
> - **ZWUS-3:** Only use ZWUS-3 if you want to be as safe as possible across strict platforms.
|
||||
> [!NOTE]
|
||||
> ZWUS-8 was removed. If you need to decode something that was encoded in ZWUS-8, send me an email at `planetrenox@pm.me` and I can help you.
|
||||
|
||||
## Why ZWUS-7 Is Smaller
|
||||
|
||||
ZWUS-6 writes each character's Unicode code point in base 6. For example, `t` is code point 116, which needs three base-6 digits. ZWUS-7 first assigns short numbers to printable ASCII characters in an order chosen for ordinary English text, then writes those numbers in base 7:
|
||||
|
||||
| Character | ZWUS-6 value | ZWUS-6 digits | ZWUS-7 rank | ZWUS-7 digits |
|
||||
| :--- | ---: | ---: | ---: | ---: |
|
||||
| `t` | 116 | 3 | 0 | 1 |
|
||||
| `e` | 101 | 3 | 1 | 1 |
|
||||
| space | 32 | 2 | 2 | 1 |
|
||||
| `a` | 97 | 3 | 3 | 1 |
|
||||
| `s` | 115 | 3 | 7 | 2 |
|
||||
|
||||
Ranks 0–6 fit in one zero-width digit; ranks 7–48 fit in two. All lowercase English letters fit in one or two digits, as do the decimal digits. Each encoded character is separated by one zero-width unifier in either standard, so shorter values directly reduce the payload length. ZWUS-7 adds `U+FEFF` as a seventh digit, but the frequency ranking is responsible for most of the saving.
|
||||
|
||||
For example, encoding `hello world` without a signature produces **42 zero-width characters with ZWUS-6** and **28 with ZWUS-7**: one third fewer characters. The count includes separators and measures characters, not UTF-8 bytes. The exact saving depends on the text. Rare printable characters can still need three digits, and control characters such as newlines can be longer in ZWUS-7. Non-ASCII characters retain their code points. Frequency ranking applies to strings only; number arrays use ordinary base-7 numbers.
|
||||
---
|
||||
|
||||
## Automatic Detection with Sign
|
||||
|
||||
If you enable **Sign** when encoding, an invisible signature is attached to the secret message. When decoding—either in the extension popup or via the on-screen overlay—inØsight identifies the base and cipher.
|
||||
If you enable **Sign** when encoding, an invisible signature is attached to the secret message. When decoding—either in the extension popup or via the on-screen overlay—inØsight automatically identifies the base and cipher.
|
||||
|
||||
---
|
||||
|
||||
@@ -63,7 +43,7 @@ Uses 7 unique characters (base 6 digits + delimiter):
|
||||
| **Digit 5** | `U+200E` | Left-to-Right Mark |
|
||||
|
||||
### ZWUS-7
|
||||
Uses 8 unique characters (base 7 digits + delimiter). Printable ASCII is ranked so frequent English characters take fewer digits; other Unicode code points retain their numeric value (control characters move above the ASCII ranks). Number arrays use ordinary base-7 values:
|
||||
Uses 8 unique characters (base 7 digits + delimiter):
|
||||
|
||||
| Role | Unicode | Character Name |
|
||||
| :--- | :--- | :--- |
|
||||
|
||||
Reference in New Issue
Block a user