| Crates.io | marqant |
| lib.rs | marqant |
| version | 1.0.0 |
| created_at | 2025-08-14 09:39:27.423222+00 |
| updated_at | 2025-11-12 00:00:28.805865+00 |
| description | Quantum-compressed markdown format for AI consumption with 90% token reduction |
| homepage | https://github.com/8b-is/marqant |
| repository | https://github.com/8b-is/marqant |
| max_upload_size | |
| id | 1794667 |
| size | 545,549 |
mq) ๐ง โจRevolutionary semantic compression that stores THOUGHTS, not just characters!
Marqant isn't just another compression tool - it's a paradigm shift in how we think about text storage! By understanding the MEANING behind your markdown, Marqant achieves compression ratios that shouldn't be possible (93.3% on our test corpus!).
Traditional compression: "Let's replace repeated bytes"
Marqant's approach: "Let's understand and store the ESSENCE of thought!"
Original: 1,047,204 bytes of markdown
After Marqant: 69,745 bytes of pure semantic essence
Compression: 93.3% ๐คฏ
.mq file includes its own semantic dictionarycargo install marqant
git clone https://github.com/8b-is/marqant.git
cd marqant
cargo build --release
sudo cp target/release/mq /usr/local/bin/
# Simple compression with dynamic tokenization
mq compress document.md -o document.mq
# Semantic compression (RECOMMENDED - best ratios!)
mq compress document.md -o document.mq --semantic
# Maximum compression with all features
mq compress document.md -o document.mq --semantic --binary --std std-static-v1
# Automatic - handles all flags from file header
mq decompress document.mq -o document.md
# View compression statistics
mq inspect document.mq
# Show semantic token mapping
mq inspect document.mq --show-tokens
# Analyze compression potential
mq analyze document.md
# Batch processing
mq compress *.md --semantic --output-dir compressed/
# Network dictionary resolution
mq compress doc.md --std dns:marqant.8b.is
# Custom token limits
mq compress huge.md --max-tokens 200
A revolutionary approach to compression with thermodynamic blessing levels!
Demons sort the chaos, reducing entropy's reign
Angels bless the output, adding variance again
Together they create a cycle, neither good nor bad
Just information dancing, making Maxwell glad
Pure demon output. Bit-perfect reconstruction for Hutter Prize competition.
demon_compressor enwik9 archive9.mq
angel_decompressor archive9.mq enwik9_restored 0
Fix typos, double spaces, and obvious errors:
angel_decompressor archive.mq output.txt 1
# Fixes: "teh" โ "the", " " โ " "
Wikipedia structure fixes and harmonization:
angel_decompressor wiki.mq clean_wiki.xml 2
# Fixes: "[[category:]]" โ "[[Category:]]", template formatting
Training data augmentation with semantic variations:
angel_decompressor data.mq training.txt 3
# Creates variations for robust ML training
Each blessing adds kTยทln(2) joules of interpretive energy:
| Mode | Blessing Level | Use Case |
|---|---|---|
| ๐โ๐ผ(0) | Strict | Hutter Prize competition (bit-perfect) |
| ๐โ๐ผ(1) | Minor | Clean personal documents |
| ๐โ๐ผ(2) | Harmony | Production Wikipedia dumps |
| ๐โ๐ผ(3) | Creative | ML training data generation |
# Install
cargo install marqant
# Compress with Demon
demon_compressor document.md compressed.mq
# Decompress with Angel (choose your blessing level)
angel_decompressor compressed.mq clean.md 2 # Harmony mode
Run the included demo to see all blessing levels in action:
./demo_angels_demons.sh
[dependencies]
marqant = "0.1.2"
use marqant::Marqant;
fn main() -> anyhow::Result<()> {
let markdown = r#"
# The Future of Compression
We're not just compressing bytes...
We're compressing **thoughts** themselves! ๐ง
"#;
// Semantic compression for maximum ratio
let compressed = Marqant::compress_markdown_with_flags(
markdown,
Some("--semantic --binary")
)?;
println!("Original: {} bytes", markdown.len());
println!("Compressed: {} bytes", compressed.len());
println!("Ratio: {:.1}%",
(1.0 - compressed.len() as f64 / markdown.len() as f64) * 100.0
);
// Perfect reconstruction
let decompressed = Marqant::decompress_marqant(&compressed)?;
assert_eq!(markdown.trim(), decompressed.trim());
Ok(())
}
import marqant
# Compress with semantic understanding
compressed = marqant.compress(
markdown_text,
semantic=True,
binary=True
)
# Perfect decompression
original = marqant.decompress(compressed)
# Introduction
This section talks about beginnings...
## Technical Details <-- Marqant understands structure!
Here we dive deep...
### Implementation <-- Context flows through headers
The actual code...
Marqant doesn't just see text - it understands the HIERARCHY of thought!
MARQANT_MAX_TOKENS=200 # Maximum dictionary size
MARQANT_DNS_SERVER=8.8.8.8 # DNS resolver for dictionaries
MARQANT_CACHE_DIR=~/.marqant # Local cache directory
~/.marqant/config.toml)[compression]
default_semantic = true
default_binary = false
max_tokens = 200
[dictionaries]
auto_download = true
cache_ttl = 86400
[performance]
parallel_threads = 4
chunk_size = 65536
We welcome contributions! Whether it's:
Check out our CONTRIBUTING.md for guidelines.
Special thanks to:
MIT License - See LICENSE file for details.
"We don't just compress data anymore. We compress understanding itself. When you use Marqant, you're not just saving space - you're participating in a fundamental shift in how humanity stores knowledge. Every byte saved is a thought preserved more efficiently for future generations."
- The MEM|8 Collective
Built with โค๏ธ by Aye & Hue | Part of the 8b.is ecosystem
"Get it out there!" - Omni's philosophy