+
    &j                     >   ^ RI Ht ^ RIHtHtHtHtHtHtH	t	 ^ RI
t
^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ]! ]]]]]4      t]P                  ! R]P,                  ].]]P.                  4      t]! ]R	4      t]R
R
]P6                  3R l4       t ! R R]4      tR# )    )contextmanager)	CFUNCTYPEPOINTERc_int
c_longlongc_void_pcastcreate_string_bufferN)
open_files)AbstractArchiveFileSystem)
MemoryFile)DEFAULT_BLOCK_SIZEread_set_seek_callback
NO_OPEN_CBallc           	   #    a aa"   \        V4      o\        S\        4      oVVV 3R lpV 3R lp\        P                  ! V4      p\        V4      p\        '       d"   \        P                  p\        P                  p	MZ\        P                  P                  \        P                  4      p\        P                  P                  \        P                  4      p	\        P                  P                  W4      ;_uu_ 4       p
\        W4       \        P                   ! V
RWV	4       \        P                  P#                  V
4      x  RRR4       R#   + '       g   i     R# ; i5i)z~Read an archive from a seekable file-like object.

The `file` object must support the standard `readinto` and 'seek' methods.
c                 f   < SP                  S4      p\        V\        \        4      4      pSV^ &   V# )r   )readintor	   r   r   )	archive_pcontextptrptrlengthbufbuf_pfiles   &&& y/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/fsspec/implementations/libarchive.py	read_func custom_reader.<locals>.read_func*   s0    s#fgh/0q	    c                 F   < SP                  W#4       SP                  4       # )N)seektell)r   r   offsetwhencer   s   &&&&r   	seek_func custom_reader.<locals>.seek_func3   s    		&!yy{r   N)r
   r	   r   ffiREAD_CALLBACKSEEK_CALLBACKnew_apir   NO_CLOSE_CB
libarchivereadOPEN_CALLBACKVOID_CBCLOSE_CALLBACKnew_archive_readr   	read_openArchiveRead)r   format_namefilter_name
block_sizer   r%   read_cbseek_cbopen_cbclose_cbr   r   r   s   f&&&       @@r   custom_readerr;   !   s      z
*ChE
 	*GI&Gw..??////<??11#++>		)	)+	C	Cyy2iwBoo)))44 
D	C	C	Cs   C9E">AE
E"E		E"c                      a a ] tR t^Ht oRtRtRtRtRRRR]3V 3R llt	]
R 4       t]V 3R	 l4       tR
 tRR ltRtVtV ;t# )LibArchiveFileSystemaM  Compressed archives as a file-system (read-only)

Supports the following formats:
tar, pax , cpio, ISO9660, zip, mtree, shar, ar, raw, xar, lha/lzh, rar
Microsoft CAB, 7-Zip, WARC

See the libarchive documentation for further restrictions.
https://www.libarchive.org/

Keeps file object open while instance lives. It only works in seekable
file-like objects. In case the filesystem does not support this kind of
file object, it is recommended to cache locally.

This class is pickleable, but not necessarily thread-safe (depends on the
platform). See libarchive documentation for details.
 r,   FrNc                P  < \         SV `  ! V 3/ VB  VR8w  d   \        R4      h\        V\        4      '       dD   \        V3RV/T;'       g    / B p\        V4      ^8w  d   \        RV RV R24      hV^ ,          pWn        VP                  4       V n	        WPn
        RV n        R# )a  
Parameters
----------
fo: str or file-like
    Contains ZIP, and must exist. If a str, will fetch file using
    :meth:`~fsspec.open_files`, which must return one file exactly.
mode: str
    Currently, only 'r' accepted
target_protocol: str (optional)
    If ``fo`` is a string, this value can be used to override the
    FS protocol inferred from a URL
target_options: dict (optional)
    Kwargs passed when instantiating the target FS, if ``fo`` is
    a string.
r?   z%Only read from archive files acceptedprotocolzPath "z(" did not resolve to exactly one file: ""N)super__init__
ValueError
isinstancestrr   lenof	__enter__for6   	dir_cache)	selfrK   modetarget_protocoltarget_optionsr6   kwargsfiles	__class__s	   &&&&&&, r   rD   LibArchiveFileSystem.__init__^   s    0 	((3;DEEb#rVOV@T@TRTVE5zQ RD HqQ  qB,,.$r   c              #     "   V P                   P                  ^ 4       \        V P                   V P                  R7      ;_uu_ 4       pVx  RRR4       R#   + '       g   i     R# ; i5i)r   )r6   N)rK   r!   r;   r6   )rM   arcs   & r   _open_archive"LibArchiveFileSystem._open_archive   s?     Q477t??3I @???s   AA*A
A*A'	!	A*c                @   < \         SV `  V4      P                  R 4      # )/)rC   _strip_protocollstrip)clspathrS   s   &&r   r[   $LibArchiveFileSystem._strip_protocol   s      w&t,33C88r   c                :   R RRRRRRRRRRRRR/pV P                   e   R	# / V n         . pV P                  4       ;_uu_ 4       pV F  pVP                  '       g   VP                  '       g   K)  V P                   P	                  V P                  \        VP                  4      4       Uu/ uF  pVR VR^ R
R/bK  	  up4       V Uu/ uF  qf\        WAV,          4      bK  	  ppVP                  '       d   RMRVR
&   VP                  VP                  4       WpP                   VR ,          &   K  	  R	R	R	4       V P                   P	                  V P                  V4       Uu/ uF  pVR VR^ R
R/bK  	  up4       R	# u upi u upi   + '       g   i     L]; iu upi )namepathnamesizecreatedctimerN   uidgidmtimeNtype	directoryr   )
rL   rW   isdirisfileupdate_all_dirnamessetra   getattrappend)rM   fields
list_namesrV   entrydirnamekeyfs   &       r   	_get_dirsLibArchiveFileSystem._get_dirs   s   JFwF55W
 >>%
!!S{{{5<<<%% (,'9'9#ejj/'J'JG  &'61fk!RR'J BHH#'%55H+0;;;KF&	!!%**-,-qy)  "$ 	  $11*==G &'61fkJJ=	

 I "!&s7   )F,=F)E;;FF 
!AF F;
FF	c                t   V P                  V4      pVR 8w  d   \        hRpV P                  4       ;_uu_ 4       pV FR  p	V	P                  V8w  d   K  V	P                  ^ 8X  d    M-V	P                  V	P                  4       F  p
T
p KL  	  \        h	  RRR4       \        WVR7      #   + '       g   i     L; i)rbr   N)fsr^   data)r[   NotImplementedErrorrW   rb   rc   
get_blocksrE   r   )rM   r^   rN   r6   
autocommitcache_optionsrQ   r}   rV   rt   blocks   &&&&&&,    r   _openLibArchiveFileSystem._open   s     ##D)4<%%!!S>>T)::?"--ejj9E D : %$  " T488 "!s   AB''B7	)r6   rL   rK   rI   )r{   NTN)__name__
__module____qualname____firstlineno____doc__root_markerrA   cachabler   rD   r   rW   classmethodr[   rx   r   __static_attributes____classdictcell____classcell__)rS   __classdict__s   @@r   r=   r=   H   sj     " KHH %%N  
 9 9'
R9 9r   r=   )
contextlibr   ctypesr   r   r   r   r   r	   r
   r,   libarchive.ffir'   fsspecr   fsspec.archiver   fsspec.implementations.memoryr   fsspec.utilsr   r)   c_archive_p	check_intr   hasattrr*   	page_sizer;   r=    r   r   <module>r      s    %      4 4 + *eXz5Is>s}}  #|
$ $)u #5 #5LM94 M9r   