Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Encode ¶
Encode converts binary data into a readable string representation using the following rules:
- Printable ASCII characters (0x20-0x7E) except '~' and '^' are kept as-is
- Control characters (0x00-0x1F) are encoded as '^' followed by their corresponding control picture character
- The DEL character (0x7F) is encoded as "^?"
- The '~' character is encoded as "~~"
- The '^' character is encoded as "~^"
- All other bytes (>= 0x80) are encoded as "~" followed by their two-digit hexadecimal representation
This encoding ensures that binary data can be safely represented as printable ASCII text, similar to quoted-printable or ASCII armor encodings.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.