dissect.squashfs 1.6.dev2__tar.gz → 1.7.dev1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {dissect_squashfs-1.6.dev2/dissect.squashfs.egg-info → dissect_squashfs-1.7.dev1}/PKG-INFO +17 -5
  2. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/README.md +11 -1
  3. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/dissect/squashfs/compression.py +5 -19
  4. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1/dissect.squashfs.egg-info}/PKG-INFO +17 -5
  5. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/dissect.squashfs.egg-info/requires.txt +7 -3
  6. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/pyproject.toml +7 -3
  7. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/COPYRIGHT +0 -0
  8. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/LICENSE +0 -0
  9. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/MANIFEST.in +0 -0
  10. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/dissect/squashfs/__init__.py +0 -0
  11. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/dissect/squashfs/c_squashfs.py +0 -0
  12. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/dissect/squashfs/exceptions.py +0 -0
  13. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/dissect/squashfs/squashfs.py +0 -0
  14. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/dissect.squashfs.egg-info/SOURCES.txt +0 -0
  15. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/dissect.squashfs.egg-info/dependency_links.txt +0 -0
  16. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/dissect.squashfs.egg-info/top_level.txt +0 -0
  17. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/setup.cfg +0 -0
  18. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/tests/__init__.py +0 -0
  19. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/tests/conftest.py +0 -0
  20. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/tests/data/gzip-opts.sqfs +0 -0
  21. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/tests/data/gzip.sqfs +0 -0
  22. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/tests/data/lz4.sqfs +0 -0
  23. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/tests/data/lzma.sqfs +0 -0
  24. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/tests/data/lzo.sqfs +0 -0
  25. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/tests/data/xz.sqfs +0 -0
  26. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/tests/data/zstd.sqfs +0 -0
  27. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/tests/docs/Makefile +0 -0
  28. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/tests/docs/conf.py +0 -0
  29. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/tests/docs/index.rst +0 -0
  30. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/tests/test_squashfs.py +0 -0
  31. {dissect_squashfs-1.6.dev2 → dissect_squashfs-1.7.dev1}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dissect.squashfs
3
- Version: 1.6.dev2
3
+ Version: 1.7.dev1
4
4
  Summary: A Dissect module implementing a parser for the SquashFS file system, commonly used in appliance or device firmware
5
5
  Author-email: Dissect Team <dissect@fox-it.com>
6
6
  License: Affero General Public License v3
@@ -22,12 +22,14 @@ Requires-Python: ~=3.9
22
22
  Description-Content-Type: text/markdown
23
23
  License-File: LICENSE
24
24
  License-File: COPYRIGHT
25
- Requires-Dist: dissect.cstruct<5,>=4.dev
25
+ Requires-Dist: dissect.cstruct<5,>=4
26
26
  Requires-Dist: dissect.util<4,>=3
27
27
  Provides-Extra: full
28
- Requires-Dist: lz4; extra == "full"
29
- Requires-Dist: python-lzo; (platform_system != "Windows" or platform_python_implementation != "PyPy") and extra == "full"
30
28
  Requires-Dist: zstandard; extra == "full"
29
+ Provides-Extra: lzo
30
+ Requires-Dist: python-lzo; (platform_system != "Windows" or platform_python_implementation != "PyPy") and extra == "lzo"
31
+ Provides-Extra: lz4
32
+ Requires-Dist: lz4; extra == "lz4"
31
33
  Provides-Extra: dev
32
34
  Requires-Dist: dissect.squashfs[full]; extra == "dev"
33
35
  Requires-Dist: dissect.cstruct<5.0.dev,>=4.0.dev; extra == "dev"
@@ -52,7 +54,17 @@ Information on the supported Python versions can be found in the Getting Started
52
54
  pip install dissect.squashfs
53
55
  ```
54
56
 
55
- This module is also automatically installed if you install the `dissect` package.
57
+ This project decompresses lzo and lz4 compressed file systems and can use the faster, native (C-based) lz4 and lzo
58
+ implementations when installed, instead of the slower pure Python implementation provided by `dissect.util`. To use
59
+ these faster implementations, install the package with the lzo and lz4 extras:
60
+
61
+ ```bash
62
+ pip install "dissect.squashfs[lz4,lzo]"
63
+ ```
64
+
65
+ Unfortunately there is no binary `python-lzo` wheel for PyPy installations on Windows, so it won't be installed there
66
+
67
+ This module including the lz4 and lzo extras is also automatically installed if you install the `dissect` package.
56
68
 
57
69
  ## Build and test instructions
58
70
 
@@ -17,7 +17,17 @@ Information on the supported Python versions can be found in the Getting Started
17
17
  pip install dissect.squashfs
18
18
  ```
19
19
 
20
- This module is also automatically installed if you install the `dissect` package.
20
+ This project decompresses lzo and lz4 compressed file systems and can use the faster, native (C-based) lz4 and lzo
21
+ implementations when installed, instead of the slower pure Python implementation provided by `dissect.util`. To use
22
+ these faster implementations, install the package with the lzo and lz4 extras:
23
+
24
+ ```bash
25
+ pip install "dissect.squashfs[lz4,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 lz4 and lzo extras is also automatically installed if you install the `dissect` package.
21
31
 
22
32
  ## Build and test instructions
23
33
 
@@ -11,9 +11,9 @@ def initialize(id: int, options: Optional[bytes]) -> Compression:
11
11
  modules = {
12
12
  c_squashfs.ZLIB_COMPRESSION: (NativeZlib,),
13
13
  c_squashfs.LZMA_COMPRESSION: (NativeLZMA,),
14
- c_squashfs.LZO_COMPRESSION: (NativeLZO, PythonLZO),
14
+ c_squashfs.LZO_COMPRESSION: (AvailableLZO,),
15
15
  c_squashfs.XZ_COMPRESSION: (NativeXZ,),
16
- c_squashfs.LZ4_COMPRESSION: (NativeLZ4, PythonLZ4),
16
+ c_squashfs.LZ4_COMPRESSION: (AvailableLZ4,),
17
17
  c_squashfs.ZSTD_COMPRESSION: (NativeZSTD,),
18
18
  }
19
19
 
@@ -60,14 +60,7 @@ class NativeLZMA(Compression):
60
60
  return self._module.decompress(data)
61
61
 
62
62
 
63
- class NativeLZO(Compression):
64
- module = "lzo"
65
-
66
- def decompress(self, data: bytes, expected: int) -> bytes:
67
- return self._module.decompress(data, False, expected)
68
-
69
-
70
- class PythonLZO(Compression):
63
+ class AvailableLZO(Compression):
71
64
  module = "dissect.util.compression.lzo"
72
65
 
73
66
  def decompress(self, data: bytes, expected: int) -> bytes:
@@ -81,18 +74,11 @@ class NativeXZ(Compression):
81
74
  return self._module.decompress(data)
82
75
 
83
76
 
84
- class NativeLZ4(Compression):
85
- module = "lz4.block"
86
-
87
- def decompress(self, data: bytes, expected: int) -> bytes:
88
- return self._module.decompress(data, expected)
89
-
90
-
91
- class PythonLZ4(Compression):
77
+ class AvailableLZ4(Compression):
92
78
  module = "dissect.util.compression.lz4"
93
79
 
94
80
  def decompress(self, data: bytes, expected: int) -> bytes:
95
- return self._module.decompress(data)
81
+ return self._module.decompress(data, uncompressed_size=expected)
96
82
 
97
83
 
98
84
  class NativeZSTD(Compression):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dissect.squashfs
3
- Version: 1.6.dev2
3
+ Version: 1.7.dev1
4
4
  Summary: A Dissect module implementing a parser for the SquashFS file system, commonly used in appliance or device firmware
5
5
  Author-email: Dissect Team <dissect@fox-it.com>
6
6
  License: Affero General Public License v3
@@ -22,12 +22,14 @@ Requires-Python: ~=3.9
22
22
  Description-Content-Type: text/markdown
23
23
  License-File: LICENSE
24
24
  License-File: COPYRIGHT
25
- Requires-Dist: dissect.cstruct<5,>=4.dev
25
+ Requires-Dist: dissect.cstruct<5,>=4
26
26
  Requires-Dist: dissect.util<4,>=3
27
27
  Provides-Extra: full
28
- Requires-Dist: lz4; extra == "full"
29
- Requires-Dist: python-lzo; (platform_system != "Windows" or platform_python_implementation != "PyPy") and extra == "full"
30
28
  Requires-Dist: zstandard; extra == "full"
29
+ Provides-Extra: lzo
30
+ Requires-Dist: python-lzo; (platform_system != "Windows" or platform_python_implementation != "PyPy") and extra == "lzo"
31
+ Provides-Extra: lz4
32
+ Requires-Dist: lz4; extra == "lz4"
31
33
  Provides-Extra: dev
32
34
  Requires-Dist: dissect.squashfs[full]; extra == "dev"
33
35
  Requires-Dist: dissect.cstruct<5.0.dev,>=4.0.dev; extra == "dev"
@@ -52,7 +54,17 @@ Information on the supported Python versions can be found in the Getting Started
52
54
  pip install dissect.squashfs
53
55
  ```
54
56
 
55
- This module is also automatically installed if you install the `dissect` package.
57
+ This project decompresses lzo and lz4 compressed file systems and can use the faster, native (C-based) lz4 and lzo
58
+ implementations when installed, instead of the slower pure Python implementation provided by `dissect.util`. To use
59
+ these faster implementations, install the package with the lzo and lz4 extras:
60
+
61
+ ```bash
62
+ pip install "dissect.squashfs[lz4,lzo]"
63
+ ```
64
+
65
+ Unfortunately there is no binary `python-lzo` wheel for PyPy installations on Windows, so it won't be installed there
66
+
67
+ This module including the lz4 and lzo extras is also automatically installed if you install the `dissect` package.
56
68
 
57
69
  ## Build and test instructions
58
70
 
@@ -1,4 +1,4 @@
1
- dissect.cstruct<5,>=4.dev
1
+ dissect.cstruct<5,>=4
2
2
  dissect.util<4,>=3
3
3
 
4
4
  [dev]
@@ -7,8 +7,12 @@ dissect.cstruct<5.0.dev,>=4.0.dev
7
7
  dissect.util<4.0.dev,>=3.0.dev
8
8
 
9
9
  [full]
10
- lz4
11
10
  zstandard
12
11
 
13
- [full:platform_system != "Windows" or platform_python_implementation != "PyPy"]
12
+ [lz4]
13
+ lz4
14
+
15
+ [lzo]
16
+
17
+ [lzo:platform_system != "Windows" or platform_python_implementation != "PyPy"]
14
18
  python-lzo
@@ -25,7 +25,7 @@ classifiers = [
25
25
  "Topic :: Utilities",
26
26
  ]
27
27
  dependencies = [
28
- "dissect.cstruct>=4.dev,<5",
28
+ "dissect.cstruct>=4,<5",
29
29
  "dissect.util>=3,<4",
30
30
  ]
31
31
  dynamic = ["version"]
@@ -37,11 +37,15 @@ repository = "https://github.com/fox-it/dissect.squashfs"
37
37
 
38
38
  [project.optional-dependencies]
39
39
  full = [
40
- "lz4",
40
+ "zstandard",
41
+ ]
42
+ lzo = [
41
43
  # There are no Windows PyPy wheels available for python-lzo
42
44
  # So we use a pure python fallback for it.
43
45
  "python-lzo; platform_system != 'Windows' or platform_python_implementation != 'PyPy'",
44
- "zstandard",
46
+ ]
47
+ lz4 = [
48
+ "lz4",
45
49
  ]
46
50
  dev = [
47
51
  "dissect.squashfs[full]",