a
    xd                     @   s4   d dl Z ddlmZ ddlmZ G dd deZdS )    N   )CompressorError   )BaseCompressorc                   @   s4   e Zd ZdZdZeedddZeedddZdS )	LzmaCompressord      )valuereturnc                 C   s"   t || jkrtj|| jdS |S )N)preset)len
min_lengthlzmacompressr   )selfr	    r   U/var/www/html/Ranjet/env/lib/python3.9/site-packages/django_redis/compressors/lzma.pyr      s    zLzmaCompressor.compressc              
   C   s@   zt |W S  t jy: } zt|W Y d }~n
d }~0 0 d S )N)r   
decompress	LZMAErrorr   )r   r	   er   r   r   r      s    zLzmaCompressor.decompressN)__name__
__module____qualname__r   r   bytesr   r   r   r   r   r   r      s   r   )r   
exceptionsr   baser   r   r   r   r   r   <module>   s   