;i @ddlmZddlmZdZdZGddZdS) Struct)UnexpectedEndOfFileError>Lrrr r!s r read_longzStreamReader.read_long#s0&-77ddT~~c4000rcT|jturdnd}||||S)zReturn the int value of the two bytes at the file position determined by `base` and `offset`, similarly to ``read_long()`` above.sHr'r!s r read_shortzStreamReader.read_short.s0'=88eee~~c4000rczd}||}||||}|d}|S)zReturn a string containing the `char_count` bytes at the file position determined by self._base_offset + `base` + `offset`.c*d|z}t|S)Nz%dsr) char_countformat_s r str_structz)StreamReader.read_str..str_struct8sj(G'?? "rzUTF-8) _unpack_itemdecode)rr-r"r#r/structchars unicode_strs rread_strzStreamReader.read_str4sP # # #J''!!&$77ll7++ rcT|j|z|z}|j|dSr )rrseek)rr"r#locations rr7zStreamReader.seekAs0$t+f4 (#####rc4|jS)zAllow pass-through tell() call.)rtell)rs rr:zStreamReader.tellEs|  """rc||||j|}t||krt|Sr )r7rrlenr)r byte_countr"r#bytes_s r _read_byteszStreamReader._read_bytesIsG $"":.. v;; # #* * rcNt|}||||Sr )rr0)rr$r"r#r2s rr zStreamReader._read_intPs%  v666rcp||j||}||dS)Nr)r?sizeunpack)rr2r"r#r>s rr0zStreamReader._unpack_itemTs2!!&+tV<<}}V$$Q''r)r)__name__ __module__ __qualname____doc__rrr%r(r*r5r7r:r?r r0 __classcell__)rs@rr r s (((((( (((1111 1 1 1 11111    $$$$###777(((((((rr N)r2r exceptionsrrrr rrrKso000000   M(M(M(M(M(M(M(M(M(M(r