Skip to content

Commit 445b71e

Browse files
committed
Switch PNG codec to single request mode for release
1 parent 015d8a0 commit 445b71e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/range_streams/codecs/png/stream.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __init__(
3232
client=None,
3333
byte_range: Range | tuple[int, int] = Range("[0, 0)"),
3434
pruning_level: int = 0,
35-
single_request: bool = False,
35+
single_request: bool = True,
3636
scan_ihdr: bool = True,
3737
enumerate_chunks: bool = True,
3838
):
@@ -55,13 +55,14 @@ def __init__(
5555
resize overlapped ranges, ``1`` will delete overlapped ranges, and ``2`` will
5656
raise an error when a new range is added which overlaps a pre-existing range).
5757
58-
If ``single_request`` is ``True`` (default: ``False``), then the behaviour when
58+
If ``single_request`` is ``True`` (default: ``True``), then the behaviour when
5959
an empty ``byte_range`` is passed instead becomes to send a standard streaming
6060
GET request (not a partial content request at all), and instead the class will
6161
then facilitate an interface that 'simulates' these calls, i.e. as if each time
6262
:meth:`~range_streams.stream.RangeStream.add` was used the range requests were
6363
being returned instantly (as everything needed was already obtained on the first
64-
request at initialisation). More performant when reading a stream linearly.
64+
request at initialisation). More performant when reading a stream linearly,
65+
and defaults to ``True`` in the PNG codec as chunks are read linearly.
6566
6667
- See docs for the
6768
:meth:`~range_streams.stream.RangeStream.handle_overlap`

0 commit comments

Comments
 (0)