o
    ‡®fN  ã                   @   s   d e de fdd„ZdS )ÚdataÚreturnc                 C   sÂ   d}d}|t | ƒk r_| | }|dkr	 |S |dkr>|dk r>t|d |d |d  ƒD ]}|t| | fƒ7 }q*|d |d  }|dkrYt| |d  fƒd|  }||7 }|d d }|t | ƒk s
|S )aÊ  
    RunLength decoder (Adobe version) implementation based on PDF Reference
    version 1.4 section 3.3.4:
        The RunLengthDecode filter decodes data that has been encoded in a
        simple byte-oriented format based on run length. The encoded data
        is a sequence of runs, where each run consists of a length byte
        followed by 1 to 128 bytes of data. If the length byte is in the
        range 0 to 127, the following length + 1 (1 to 128) bytes are
        copied literally during decompression. If length is in the range
        129 to 255, the following single byte is to be copied 257 - length
        (2 to 128) times during decompression. A length value of 128
        denotes EOD.
    ó    é    é€   é   i  )ÚlenÚrangeÚbytes)r   ÚdecodedÚiÚlengthÚjÚrun© r   úK/home/ubuntu/webapp/venv/lib/python3.10/site-packages/pdfminer/runlength.pyÚrldecode	   s"   öór   N)r	   r   r   r   r   r   Ú<module>   s   