Skip to content

Commit

Permalink
Switch PNG codec to single request mode for release
Browse files Browse the repository at this point in the history
  • Loading branch information
lmmx committed Aug 4, 2021
1 parent 015d8a0 commit 445b71e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/range_streams/codecs/png/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(
client=None,
byte_range: Range | tuple[int, int] = Range("[0, 0)"),
pruning_level: int = 0,
single_request: bool = False,
single_request: bool = True,
scan_ihdr: bool = True,
enumerate_chunks: bool = True,
):
Expand All @@ -55,13 +55,14 @@ def __init__(
resize overlapped ranges, ``1`` will delete overlapped ranges, and ``2`` will
raise an error when a new range is added which overlaps a pre-existing range).
If ``single_request`` is ``True`` (default: ``False``), then the behaviour when
If ``single_request`` is ``True`` (default: ``True``), then the behaviour when
an empty ``byte_range`` is passed instead becomes to send a standard streaming
GET request (not a partial content request at all), and instead the class will
then facilitate an interface that 'simulates' these calls, i.e. as if each time
:meth:`~range_streams.stream.RangeStream.add` was used the range requests were
being returned instantly (as everything needed was already obtained on the first
request at initialisation). More performant when reading a stream linearly.
request at initialisation). More performant when reading a stream linearly,
and defaults to ``True`` in the PNG codec as chunks are read linearly.
- See docs for the
:meth:`~range_streams.stream.RangeStream.handle_overlap`
Expand Down

0 comments on commit 445b71e

Please sign in to comment.