Tryag File Manager
Home
-
Turbo Force
Current Path :
/
usr
/
lib
/
python2.4
/
site-packages
/
rhpl
/
Upload File :
New :
File
Dir
//usr/lib/python2.4/site-packages/rhpl/gzread.pyo
mς ±μ<c @ s\ d k Z d k Z d k Z d \ Z Z Z Z Z d Z d d Z d f d YZ d S( Ni i i i i c C s\ t | d } | t | d d >} | t | d d >} | t | d d >} | S( Ni i i i i i i ( t ordt buft v( R R ( ( t/ /usr/lib/python2.4/site-packages/rhpl/gzread.pyt read32 s c C s t | | S( N( t GzipFilet filenamet fileobj( R R ( ( R t open# s R c B s t Z d Z d d d Z d Z d Z d d Z d Z d d Z d Z d Z d Z d Z d Z d Z d Z d Z RS( Nc C sj | d j o t i | d } | _ n | i t i t i | _ | | _ d | _ | i d S( Nt ri ( R t Nonet __builtin__R R t selft myfileobjt _init_readt zlibt decompressobjt MAX_WBITSt decompresst compressedt _read_gzip_header( R R R ( ( R t __init__* s c C s: t i d | _ d | _ d | _ d | _ d | _ d S( Nt i ( R t crc32R t crct sizet extrabuft extrasizet lastbuf( R ( ( R R 3 s c C s | i i d } | d j o | i | d | _ d Sn t | i i d } | d j o t d n t | i i d } | i i d | t @oL t | i i d } | d t | i i d } | i i | n | t @o8 x5 | i i d } | p | d j o Pqό qό Wn | t @o8 x5 | i i d } | p | d j o Pq?q?Wn | t @o | i i d n d S( Ni s i i i s Unknown compression methodi i t ( R R t readt magict _unreadR R t methodt RuntimeErrort flagt FEXTRAt xlent FNAMEt st FCOMMENTt FHCRC( R R R' R! R% R# ( ( R R : s8 c C sΖ | i d j o | i d j o d Sn | i pΗ d } | oE | i | j o5 | i | } | i | | _ | i | | _ | Sn | i o7 | i } | o | | i } n d | _ d | _ n | p | | i i Sqω | | i i | Sn d } | pF y# x | i | | d } qWWqt j o | i } qXnJ y3 x, | | i j o | i | | d } qRWWn t j o n X| i | } | i | | _ | i | | _ | S( Ni R i i i ( R R R R R t chunkR R R t readsizet _readt EOFError( R R R+ R* ( ( R R [ sL c C s* | | i | _ t | | i | _ d S( N( R R R t lenR ( R R ( ( R R s i c C sA y | i i | } Wn t j o t d n X| d j o@ | i i } | d j o | i d | _ t d qι nh t | } | d j o d } | d } n d | } d } | i | | | | _ | i i | } t i | | i | _ | i | | _ | i t | | _ | i t | | _ d S( Ns Reached EOFR i i ( R R R R R t AttributeErrorR- R t flusht uncompresst _read_eofR R. R% t xofft boffR R R R R R ( R R R1 R R% R4 R3 ( ( R R, s, c C sg t | i d } t | i d d ! } | | i j o t d n | | i j o t d n d S( Ni i s CRC check faileds! Incorrect length of data produced( R R R R t isizeR t IOErrorR ( R R R5 ( ( R R2 ₯ s c C s1 d | _ | i o | i i d | _ n d S( N( R R R R t close( R ( ( R R7 s c C s | i i d S( N( R R R0 ( R ( ( R R0 ³ s c C s t d d S( Ns' Random access not allowed in gzip files( R6 ( R ( ( R t seekΆ s c C s t d d S( Ns! I won't tell() you for gzip files( R6 ( R ( ( R t tellΉ s c C s d S( Ni ( ( R ( ( R t isattyΌ s c C s€ g } d } x | i | } t i | d } | d j p | d j o: | i | | | i | | d t i | d Sn | i | | d } q Wd S( Nid i s i R i ( t bufsR+ R R t ct stringt findt it appendR t joinR ( R R<