@@ -373,12 +373,10 @@ interest in this object are:
373373 any format specific state or options.
374374
375375**pulls_fd **
376- **EXPERIMENTAL ** -- **WARNING **, interface may change. If set to 1,
377- ``state->fd `` will be a pointer to the Python file like object. The
378- decoder may use the functions in ``codec_fd.c `` to read directly
379- from the file like object rather than have the data pushed through a
380- buffer. Note that this implementation may be refactored until this
381- warning is removed.
376+ If set to 1, ``state->fd `` will be a pointer to the Python file like
377+ object. The decoder may use the functions in ``codec_fd.c `` to read
378+ directly from the file like object rather than have the data pushed
379+ through a buffer.
382380
383381 .. versionadded :: 3.3.0
384382
@@ -389,17 +387,16 @@ Decoding
389387The decode function is called with the target (core) image, the
390388decoder state structure, and a buffer of data to be decoded.
391389
392- **Experimental ** -- If ``pulls_fd `` is set, then the decode function
393- is called once, with an empty buffer. It is the decoder's
394- responsibility to decode the entire tile in that one call. The rest of
395- this section only applies if ``pulls_fd `` is not set.
396-
397390It is the decoder's responsibility to pull as much data as possible
398391out of the buffer and return the number of bytes consumed. The next
399392call to the decoder will include the previous unconsumed tail. The
400393decoder function will be called multiple times as the data is read
401394from the file like object.
402395
396+ Alternatively, if ``pulls_fd `` is set, then the decode function is
397+ called once, with an empty buffer. It is the decoder's responsibility
398+ to decode the entire tile in that one call.
399+
403400If an error occurs, set ``state->errcode `` and return -1.
404401
405402Return -1 on success, without setting the errcode.
0 commit comments