Skip to content

Commit aaba33b

Browse files
committed
More concise module names; multi-file tarballs to test codec support
1 parent 8bb99f9 commit aaba33b

22 files changed

+380
-159
lines changed

data/data.tar

8 KB
Binary file not shown.

data/data.tar.bz2

5.65 KB
Binary file not shown.

data/data.tar.gz

5.27 KB
Binary file not shown.

data/example_text_file.txt.tar.bz2

-153 Bytes
Binary file not shown.

data/example_text_file.txt.tar.gz

-136 Bytes
Binary file not shown.

data/example_text_file.txt.zst

-24 Bytes
Binary file not shown.

src/range_streams/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
:attr:`~range_streams.range_stream.RangeStream.ranges` attribute. This gates access
4747
to the internal ``_ranges`` attribute :class:`~ranges.RangeDict`), which takes
4848
into account whether the bytes in each range's
49-
:class:`~range_streams.range_response.RangeResponse` are exhausted
49+
:class:`~range_streams.response.RangeResponse` are exhausted
5050
or removed due to overlap with another range. See the docs for further details.
5151
5252
Further ranges are requested by simply calling the :meth:`~range_streams.range_stream.RangeStream.add`
@@ -125,14 +125,14 @@
125125
# Get classes into package namespace but exclude from __all__ so Sphinx can access types
126126

127127
from . import codecs, http_utils, overlaps, range_utils
128-
from .range_request import RangeRequest
129-
from .range_response import RangeResponse
130128
from .range_stream import RangeStream
129+
from .request import RangeRequest
130+
from .response import RangeResponse
131131

132132
__all__ = [
133133
"range_stream",
134-
"range_request",
135-
"range_response",
134+
"request",
135+
"response",
136136
"http_utils",
137137
"overlaps",
138138
"range_utils",

src/range_streams/codecs/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111

1212
from .conda import CondaStream
1313
from .png import PngStream
14+
from .tar import TarStream
1415
from .zip import ZipStream
1516

1617
__all__ = [
1718
"ZipStream",
19+
"TarStream",
1820
"CondaStream",
1921
"PngStream",
2022
]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .data import COMPRESSIONS
2+
3+
__all__ = ["COMPRESSIONS"]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
__all__ = ["COMPRESSIONS"]
2+
3+
COMPRESSIONS = {
4+
# gz
5+
".gz": "gz",
6+
".tgz": "gz",
7+
# xz
8+
".xz": "xz",
9+
".txz": "xz",
10+
# bz2
11+
".bz2": "bz2",
12+
".tbz": "bz2",
13+
".tbz2": "bz2",
14+
".tb2": "bz2",
15+
# zst
16+
".zst": "zst",
17+
".tzst": "zst",
18+
}

0 commit comments

Comments
 (0)