What we found when digging into this further - I was reading relatively large files (>100Mb) from a Data Lake Gen2 and seeing the read()
fail with a buffer size error like this:
ERROR 1: TIFFReadEncodedStrip:Read error at scanline 4294967295; got 4600 bytes, expected 8000
ERROR 1: TIFFReadEncodedStrip() failed.
ERROR 1: /vsipythonfilelike/6c4028d8-2a05-4b4a-95fd-998f4395afb7/6c4028d8-2a05-4b4a-95fd-998f4395afb7, band 1: IReadBlock failed at X offset 0, Y offset
My colleague tried it on tiny files in blob storage and the behaviour of the StreamInfoFileObject
withrasterio
worked as you'd hope and expect