Xj 8ddlmZddlmZdZdZGddZy) Struct)UnexpectedEndOfFileError>Lrrr r!s r read_longzStreamReader.read_long#s+&&-7dT~~c400rcT|jturdnd}|j|||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.s+''=8ee~~c400rcdd}||}|j|||}|jd}|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_str4s; #J'!!&$7ll7+ rc^|j|z|z}|jj|yr )rrseek)rr"r#locations rr7zStreamReader.seekAs)$$t+f4 (#rc6|jjS)zAllow pass-through tell() call.)rtell)rs rr:zStreamReader.tellEs||  ""rc|j|||jj|}t||krt|Sr )r7rrlenr)r byte_countr"r#bytes_s r _read_byteszStreamReader._read_bytesIs; $"":. v; #* * rc>t|}|j|||Sr )rr0)rr$r"r#r2s rr zStreamReader._read_intPs   v66rcd|j|j||}|j|dS)Nr)r?sizeunpack)rr2r"r#r>s rr0zStreamReader._unpack_itemTs.!!&++tV<}}V$Q''r)r)__name__ __module__ __qualname____doc__rrr%r(r*r5r7r:r?r r0 __classcell__)rs@rr r s? ( (1 11 $#7(rr N)r2r exceptionsrrrr rrrKs!0   M(M(r