�&ǐk�@'bJ�h�ۊL'}T� :��'2�Z#$��n�a��� �>a��`��_3d�Qpt�/�P -��#5�,�M��� �pA:©�q�����NW��ډ�A���� �9nʺج���� �TSM��{J6?7��r�@�\����D��� �׶���s�f�TJj?"��D��`?��̒� b�#�%�C*v�$�{�$����5Ծ�F�s��y�e/8��h-�f�̰&(����Gj�L:U� 2�� ����v�_k����Y��gp,�k�WF�R������_C�R��N@���R�@�ߔ?A�w9���F("iNa-S���Q�o�3tDMLh*�#4k�T/iQ��Y*�G��m����)��8�hBm/�I�,g�ﯖ���Z��}�Cz�q@´��d.����L�ŕ�,��1�Z�܌�: ̪���F+J-'��c�tvJ8��]Q-��b��y �6;*J`r_�d ��'�G ~p��)'�C,�%F��E(��2�k�����lР�z�!�=t ��_�0��f7��� ;�p�|�U �%<LT)structclosedalignfileread chunknamelenEOFErrorZ unpack_from chunksizeerror size_readtelloffsetAttributeErrorOSErrorseekable)selfr r Z bigendianZ inclheaderrZstrflagr/usr/lib64/python3.6/chunk.py__init__4s,     zChunk.__init__cCs|jS)z*Return the name (ID) of the current chunk.)r )rrrrgetnameNsz Chunk.getnamecCs|jS)z%Return the size of the current chunk.)r)rrrrgetsizeRsz Chunk.getsizec Cs |jsz |jWdd|_XdS)NT)r skip)rrrrcloseVs z Chunk.closecCs|jrtddS)NzI/O operation on closed fileF)r ValueError)rrrrisatty]sz Chunk.isattyrcCsv|jrtd|jstd|dkr0||j}n|dkrB||j}|dksT||jkrXt|jj|j |d||_dS)zSeek to specified position into the chunk. Default position is 0 (start of chunk). If the file is not seekable, this will result in an error. zI/O operation on closed filez cannot seekrN) r r rrrr RuntimeErrorr seekr)rposwhencerrrr%bs  z Chunk.seekcCs|jrtd|jS)NzI/O operation on closed file)r r r)rrrrrusz Chunk.tellr"cCs|jrtd|j|jkrdS|dkr2|j|j}||j|jkrN|j|j}|jj|}|jt||_|j|jkr|jr|jd@r|jjd}|jt||_|S)zRead at most size bytes from the chunk. If size is omitted or negative, read until the end of the chunk. zI/O operation on closed filerr")r r rrr r rr )rsizedatadummyrrrr zs        z Chunk.readc Cs|jrtd|jrlyB|j|j}|jr:|jd@r:|d}|jj|d|j||_dStk rjYnXx4|j|jkrt d|j|j}|j |}|snt qnWdS)zSkip the rest of the chunk. If you are not interested in the contents of the chunk, this method should be called so that the file points to the start of the next chunk. zI/O operation on closed filer"Ni ) r r rrrr r r%rminr r)rnr+rrrrs"   z Chunk.skipN)TTF)r)r.) __name__ __module__ __qualname__rrrrr!r%rr rrrrrr3s   rN)__doc__rrrrr1s