> zeromq | source-safe | efficient <

// Z85 - ZeroMQ's Base85 variant safe for source code and JSON

[SOURCE-SAFE]

Code Friendly

No quotes, backslashes, or whitespace. Safe for C/C++ strings and JSON.

[EFFICIENT]

High Density

25% overhead - more efficient than Base64's 33% overhead.

[ZEROMQ]

ZeroMQ Standard

Official encoding used by ZeroMQ for binary data in text protocols.

>> technical info

How Z85 Works:

Z85 encodes 4 bytes into 5 characters using 85 printable ASCII characters. The alphabet is carefully chosen to avoid characters that need escaping in C/C++ strings and JSON.

Example:

"Hello" → nm=QNz.92

Why Use Z85:

  • >No escape characters needed
  • >Safe for all programming languages
  • >25% overhead (better than Base64)
  • >ZeroMQ messaging standard
  • >JSON and XML friendly

>> frequently asked questions

What is Z85 encoding?

Z85 is ZeroMQ's Base85 variant that uses 85 printable ASCII characters specifically chosen to be safe for embedding in source code without escaping.

How does Z85 differ from regular Base85?

Z85 uses a different alphabet that avoids quotes, backslashes, and whitespace, making it safe to embed directly in C/C++ strings, JSON, and other formats without escaping.

When should I use Z85?

Use Z85 when you need to embed binary data in source code, configuration files, or network protocols where escaping would be problematic. It's ideal for ZeroMQ messaging.

What are Z85's requirements?

Z85 requires input data length to be a multiple of 4 bytes. The encoder will automatically pad if necessary, but be aware of this requirement when decoding.

Other Languages