+
    ˜°³j  ã            	       óˆ   € ^ RI Ht ^ RIHt ^ RIHt ^ RIHt R.t]! R4       ! R R]]	]
]3,          ,          4      4       tR# )	é    )ÚIterator)ÚIOBase)Úfunctional_datapipe)ÚIterDataPipeÚStreamReaderIterDataPipeÚread_from_streamc                   óL   a € ] tR t^t o RtRV 3R lR lltV 3R lR ltRtV tR# )	r   aš  
Given IO streams and their label names, yield bytes with label name as tuple.

(functional name: ``read_from_stream``).

Args:
    datapipe: Iterable DataPipe provides label/URL and byte stream
    chunk: Number of bytes to be read from stream per iteration.
        If ``None``, all bytes will be read until the EOF.

Example:
    >>> # xdoctest: +SKIP
    >>> from torchdata.datapipes.iter import IterableWrapper, StreamReader
    >>> from io import StringIO
    >>> dp = IterableWrapper([("alphabet", StringIO("abcde"))])
    >>> list(StreamReader(dp, chunk=1))
    [('alphabet', 'a'), ('alphabet', 'b'), ('alphabet', 'c'), ('alphabet', 'd'), ('alphabet', 'e')]
Nc                ó^   <€ V ^8„  d   QhRS[ S[S[S[3,          ,          RS[R,          RR/# )é   ÚdatapipeÚchunkNÚreturn)r   ÚtupleÚstrr   Úint)ÚformatÚ__classdict__s   "€Úm/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/utils/data/datapipes/iter/streamreader.pyÚ__annotate__Ú%StreamReaderIterDataPipe.__annotate__    s7   ø€ ÷ ñ Ù$¡U©3±¨;Õ%7Õ8ðÙADÀtÅðà	ñó    c                ó   € Wn         W n        R # ©N)r   r   )Úselfr   r   s   &&&r   Ú__init__Ú!StreamReaderIterDataPipe.__init__    s   € ð !ŒØŽ
r   c                óF   <€ V ^8„  d   QhRS[ S[S[S[3,          ,          /# )r   r   )r   r   r   Úbytes)r   r   s   "€r   r   r   &   s"   ø€ ÷  ñ  ™(¡5©©e¨Õ#4Õ5ñ  r   c              #  ó®   "  € V P                    F@  w  r VP                  V P                  4      pV'       g   VP                  4        K;  W3x € K=  	  R# 5i)TN)r   Úreadr   Úclose)r   ÚfurlÚstreamÚds   &   r   Ú__iter__Ú!StreamReaderIterDataPipe.__iter__&   s@   é € Ø ŸMœM‰LˆDØØ—K‘K §
¡
Ó+�ßØ—L‘L”NÙØ�i”ó *ùs
   ‚5A¸A)r   r   r   )	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r%   Ú__static_attributes__Ú__classdictcell__)r   s   @r   r   r      s   ø‡ € ñ÷&ò ÷ ö  r   N)Úcollections.abcr   Úior   Ú%torch.utils.data.datapipes._decoratorr   Ú#torch.utils.data.datapipes.datapiper   Ú__all__r   r   r   r   © r   r   Ú<module>r4      sJ   ðÝ $Ý å EÝ <ð &Ð
&€ñ Ð'Ó(ô! ˜|¨E°#°u°*Õ,=Õ>ó ! ó )ò! r   