관리-도구
편집 파일: evr_utils.cpython-311.pyc
� \�DgN � �� � d dl mZmZmZmZmZ dgZdee deee fd�Zdeeeef defd�Z deee ee ef defd �Z d ee dee fd�ZdS ) � )�Union�List�AnyStr�Tuple�Optional� serialize_evr�intgr�returnc �� � g }| }|dk r.t |d� � \ }}|� |� � |dk �.|� dt |� � z � � |� � � |S )z� Encode int in real-numbers segment. See http://en.wikipedia.org/wiki/Arithmetic_coding. @param intgr: int for coding in Float an segment [seg_begin, seg_end] @return: list encoding segment r � � )�divmod�append�len�reverse)r �lst�number� remainders �r/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/clcommon/evr_utils.py�"encode_int_to_real_numbers_segmentr sx � � �C� �F� �1�*�*�"�6�3�/�/��� �� � �9���� �1�*�*� �J�J�s�S��X�X�~�����K�K�M�M�M��J� �rpm_datac �( � g }| D ]�}t |t � � r#|� t |� � � � n�t |t � � rD|� � � r0|� t t |� � � � � � nGt |t � � r |� d� |D � � � � nt d|� �� � �|� d� � ��d� d� |D � � � � S )z� Encode List of parts of Version or Epoch or Release in real-numbers segment. See http://en.wikipedia.org/wiki/Arithmetic_coding. @param rpm_data: list to convert in double @return: Converted string c 3 �4 K � | ]}t |� � V � �d S )N)�ord)�.0�chs r � <genexpr>zevr_to_float.<locals>.<genexpr>6 s( � � � �.�.�2�s�2�w�w�.�.�.�.�.�.r z ThisStrange: r � c � � g | ]}|d ���S )�02x� )r �ns r � <listcomp>z evr_to_float.<locals>.<listcomp>: s � �,�,�,�1�q�J�J�,�,�,r ) � isinstance�int�extendr �str�isdigit� NameErrorr �join)r �evr�elems r �evr_to_floatr. '