Skip to content

Commit 2fdeec1

Browse files
author
Jan Willem Brandenburg
committed
Move the selection between the native and Python implementations of lzo and lz4 to dissect.util
1 parent 781b8e1 commit 2fdeec1

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,17 @@ Information on the supported Python versions can be found in the Getting Started
1717
pip install dissect.btrfs
1818
```
1919

20-
This module is also automatically installed if you install the `dissect` package.
20+
This project decompresses lzo compressed file systems and can use the faster, native (C-based) lzo implementation when
21+
installed, instead of the slower pure Python implementation provided by `dissect.util`. To use these faster
22+
implementations, install the package with the lzo extra:
23+
24+
```bash
25+
pip install "dissect.btrfs[lzo]"
26+
```
27+
28+
Unfortunately there is no binary `python-lzo wheel` for PyPy installations on Windows, so it won't be installed there.
29+
30+
This module including the lzo extra is also automatically installed if you install the `dissect` package.
2131

2232
## Build and test instructions
2333

dissect/btrfs/stream.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,9 @@
66
from typing import TYPE_CHECKING, BinaryIO, NamedTuple
77
from uuid import UUID
88

9+
from dissect.util.compression import lzo
910
from dissect.util.stream import AlignedStream
1011

11-
try:
12-
import lzo
13-
except ImportError:
14-
from dissect.util.compression import lzo
15-
1612
try:
1713
import zstandard
1814

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ repository = "https://github.com/fox-it/dissect.btrfs"
3737

3838
[project.optional-dependencies]
3939
full = [
40-
# There are no Windows PyPy wheels available for python-lzo
41-
# So we use a pure python fallback for it.
42-
"python-lzo; platform_system != 'Windows' or platform_python_implementation != 'PyPy'",
4340
"zstandard",
4441
]
4542
gcrc32 = [

0 commit comments

Comments
 (0)