HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/zmq/utils/__pycache__/z85.cpython-310.pyc
o

�N�g�@sRdZddlZdZdd�ee�D�Zdd�ed�D�ddd	�Zd
d�Zdd
�ZdS)z�Python implementation of Z85 85-bit encoding

Z85 encoding is a plaintext encoding for a bytestring interpreted as 32bit integers.
Since the chunks are 32bit, a bytestring must be a multiple of 4 bytes.
See ZMQ RFC 32 for details.


�NsU0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#cCsi|]\}}||�qS�r)�.0�idx�crr�A/opt/saltstack/salt/lib/python3.10/site-packages/zmq/utils/z85.py�
<dictcomp>srcCsg|]}d|�qS)�Ur)r�irrr�
<listcomp>sr
����cCsnt|�drtdt|���t|�d}t�d||�}g}|D]}tD]
}|�t||d�q$q t|�S)zencode raw bytes into Z85�z$length must be multiple of 4, not %i�>%dIr)�len�
ValueError�struct�unpack�_85s�append�Z85CHARS�bytes)�rawbytes�nvalues�values�encoded�v�offsetrrr�encodes�rcCs�t|t�rz|�d�}Wntytd��wt|�dr&tdt|���t|�d}g}tdt|�d�D]}d}tt�D]\}}|t	||||7}q>|�
|�q6tjd|g|�R�S)z3decode Z85 bytes to raw bytes, accepts ASCII string�asciiz4string argument should contain only ASCII charactersrz(Z85 length must be multiple of 5, not %irr)
�
isinstance�strr�UnicodeEncodeErrorrr�range�	enumerater�Z85MAPrr�pack)Zz85bytesrrr	�value�jrrrr�decode(s 
�r()	�__doc__rrr#r$r"rrr(rrrr�<module>s