3 ms·
I think the appeal is that it's a generator, so that if you need to encapsulate/cram bytes of the zip over some other transport that you can just naturally ask
by mlyle 6y ago
I think the appeal is that it's a generator, so that if you need to encapsulate/cram bytes of the zip over some other transport that you can just naturally ask for a few more each time without having to accumulate it in memory.
Of course, by crafting a special file-like object you could avoid this too, but perhaps a bit less elegantly.