← Back
Editing: z85.cpython-311.pyc
� mc�c � � � d Z ddlZdZd� ee� � D � � Zd� ed� � D � � ddd� Zd� Zd � 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. � NsU 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#c � � i | ]\ }}||�� S � r )�.0�idx�cs �//usr/lib/python3/dist-packages/zmq/utils/z85.py� <dictcomp>r s � � 3� 3� 3�V�S�!�!�S� 3� 3� 3� c � � g | ]}d |z ��S )�U r )r �is r � <listcomp>r s � � � � �!��A�� � � r � ���c �D � t | � � dz rt dt | � � z � � �t | � � dz }t j d|z | � � }g }|D ]2}t D ](}|� t ||z dz � � �)�3t |� � 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�offsets r �encoder"