gitText - Shareable Text Editor (https://amiyamandal-dev.github.io/gitText/)
A text editor where the entire document state is compressed and stored in the URL fragment. Share the URL to share the exact document state.
- URL State Storage: Text is automatically compressed and saved to the URL
- LZSS Compression: Efficient text compression (50-70% reduction)
- Base64URL Encoding: URL-safe encoding for sharing
- No Server Required: Everything runs client-side
- Instant Sharing: Copy the URL to share your text
Requires Rust (stable) with the wasm32-unknown-unknown target:
rustup target add wasm32-unknown-unknown
cargo build --release
cp target/wasm32-unknown-unknown/release/editor.wasm docs/editor.wasmServe the docs/ directory with any static file server:
cd docs
python3 -m http.server 8000Then open http://localhost:8000
- Type or paste text into the editor
- The URL automatically updates with compressed content (debounced 500ms)
- Copy the URL using the "Copy Link" button or Ctrl/Cmd+Shift+C
- Share the URL - anyone opening it sees the exact same text
Ctrl/Cmd + S- Force save to URLCtrl/Cmd + Shift + C- Copy shareable link
Save: Text -> UTF-8 -> LZSS compress -> Base64URL encode -> URL fragment
Load: URL fragment -> Base64URL decode -> LZSS decompress -> UTF-8 -> Text
- Window size: 4096 bytes
- Min match length: 3 bytes
- Max match length: 18 bytes
https://example.com/editor/#eJzLSM3JyQcABiwCFQ
└── base64url encoded compressed data
gitText/
├── src/
│ └── lib.rs # WASM module: compression, encoding, AES, QR, sessions, lexer
├── docs/
│ ├── index.html # Editor UI
│ ├── app.js # WASM loader, editor logic
│ └── editor.wasm # Compiled WASM (after build)
├── Cargo.toml # Rust crate manifest
├── .cargo/config.toml # Default target + linker flags
└── README.md
- URL length is practically limited by browsers (~2000-8000 chars depending on browser)
- Very large documents may exceed URL limits
- No syntax highlighting (plain text only)