o bc3 @s gdZddlZddlZddlZddlTddlmZmZddlZdZdZ dZ Gdddej Z ddd dddddd d d Z ed ddfddZeddfddZdS))$Z CHECK_NONEZ CHECK_CRC32Z CHECK_CRC64Z CHECK_SHA256Z CHECK_ID_MAXZ CHECK_UNKNOWNZ FILTER_LZMA1Z FILTER_LZMA2Z FILTER_DELTAZ FILTER_X86Z FILTER_IA64Z FILTER_ARMZFILTER_ARMTHUMBZFILTER_POWERPCZ FILTER_SPARC FORMAT_AUTO FORMAT_XZZ FORMAT_ALONEZ FORMAT_RAWZMF_HC3ZMF_HC4ZMF_BT2ZMF_BT3ZMF_BT4Z MODE_FASTZ MODE_NORMALZPRESET_DEFAULTZPRESET_EXTREMELZMACompressorLZMADecompressorLZMAFile LZMAErroropencompress decompressZis_check_supportedN)*)_encode_filter_properties_decode_filter_propertiesc@seZdZ d!dddddddZddZed d Zd d Zd dZddZ ddZ d"ddZ d"ddZ d"ddZ d"ddZddZejfddZdd ZdS)#rNrformatcheckpresetfiltersc Cs* d|_d|_t|_|dvr'|dkrtd|durtd|dur$t}t}n |dvr@|dur1t}t}t ||||d|_ d|_ ntd |t |tttjfrfd |vrX|d 7}t|||_d |_||_nt|d spt|d rw||_||_ntd|jtkrtj|jtt||d}t||_dSdS)NF)rrbrzACannot specify an integrity check when opening a file for readingzICannot specify a preset compression level when opening a file for reading)wwbaZabxZxbrr zInvalid mode: {!r}bTreadwritez6filename must be a str, bytes, file or PathLike object)trailing_errorrr)_fp_closefp _MODE_CLOSED_mode ValueErrorr _MODE_READr _MODE_WRITEr _compressor_posr isinstancestrbytesosPathLikebuiltinsrhasattr TypeError _compressionDecompressReaderrrioBufferedReader_buffer) selffilenamemoderrrrZ mode_coderawr:e/home/lily/lilypond-2.24.1/release/binaries/dependencies/install/Python-3.10.8/lib/python3.10/lzma.py__init__1sJ*  zLZMAFile.__init__cCs |jtkrdSzK|jtkr|jd|_n|jtkr(|j|j d|_Wz |j r>|jWd|_d|_ t|_dSWd|_d|_ t|_dSd|_d|_ t|_wz|j rh|jWd|_d|_ t|_wWd|_d|_ t|_wd|_d|_ t|_w)NF) r#r"r%r5closer&r rr'flushr!r6r:r:r;r=sJ        zLZMAFile.closecCs |jtkSN)r#r"r?r:r:r;closeds zLZMAFile.closedcCs ||jSr@)_check_not_closedr filenor?r:r:r;rC zLZMAFile.filenocCs |o |jSr@)readabler5seekabler?r:r:r;rFszLZMAFile.seekablecC ||jtkSr@)rBr#r%r?r:r:r;rErDzLZMAFile.readablecCrGr@)rBr#r&r?r:r:r;writablerDzLZMAFile.writablecC ||j|Sr@)_check_can_readr5peekr6sizer:r:r;rKs z LZMAFile.peekcCrIr@)rJr5rrLr:r:r;rs z LZMAFile.readcCs$ ||dkr tj}|j|S)Nr )rJr3DEFAULT_BUFFER_SIZEr5read1rLr:r:r;rOs  zLZMAFile.read1cCrIr@)rJr5readlinerLr:r:r;rPs zLZMAFile.readlinecCsZ |t|ttfrt|}nt|}|j}|j|}|j ||j |7_ |Sr@) _check_can_writer)r+ bytearraylen memoryviewnbytesr'rr rr()r6datalengthZ compressedr:r:r;rs   zLZMAFile.writecCs ||j||Sr@)_check_can_seekr5seek)r6offsetwhencer:r:r;rYsz LZMAFile.seekcCs$ ||jtkr|jS|jSr@)rBr#r%r5tellr(r?r:r:r;r\s   z LZMAFile.tell)Nr)r)__name__ __module__ __qualname__r<r=propertyrArCrFrErHrKrrOrPrr3SEEK_SETrYr\r:r:r:r;r&s&  U     rrr)rrrrencodingerrorsnewlinec Cs d|vrd|vrtd|fn|durtd|dur!td|dur)td|dd} t|| ||||d} d|vrJt|}t| |||S| S) NtrzInvalid mode: %rz0Argument 'encoding' not supported in binary modez.Argument 'errors' not supported in binary modez/Argument 'newline' not supported in binary moder)r$replacerr3 text_encoding TextIOWrapper) r7r8rrrrrbrcrdZlz_modeZ binary_filer:r:r;rs&   rcCs" t||||}|||Sr@)rrr>)rVrrrrcompr:r:r;r?srcCsl g} t|||}z||}Wn ty|rYnw|||js*td|j}|s0nqd|S)NTzACompressed data ended before the end-of-stream marker was reached)rr rappendeof unused_datajoin)rVrZmemlimitrresultsZdecompresr:r:r;r Ks&    r )r)__all__r.r3r,Z_lzmar r r1r"r%r& BaseStreamrrrrrr r:r:r:r;s&  j 0