@@ -395,7 +395,9 @@ from the file like object.
395395
396396Alternatively, if ``pulls_fd `` is set, then the decode function is
397397called once, with an empty buffer. It is the decoder's responsibility
398- to decode the entire tile in that one call.
398+ to decode the entire tile in that one call. Using this will provide a
399+ codec with more freedom, but that freedom may mean increased memory usage
400+ if entire tile is held in memory at once by the codec.
399401
400402If an error occurs, set ``state->errcode `` and return -1.
401403
@@ -429,6 +431,13 @@ Python-based file codec:
429431 a buffer of data to be interpreted, or the ``encode `` method is repeatedly
430432 called with the size of data to be output.
431433
434+ Alternatively, if the decoder's ``_pulls_fd `` property (or the encoder's
435+ ``_pushes_fd `` property) is set to ``True ``, then ``decode `` and ``encode ``
436+ will only be called once. In the decoder, ``self.fd `` can be used to access
437+ the file-like object. Using this will provide a codec with more freedom, but
438+ that freedom may mean increased memory usage if entire file is held in
439+ memory at once by the codec.
440+
432441 In ``decode ``, once the data has been interpreted, ``set_as_raw `` can be
433442 used to populate the image.
434443
0 commit comments