Skip to content

Commit 4140999

Browse files
authored
Merge pull request #151 from openzim/nolzma
Remove lzma compression option
2 parents 8fee0b4 + a6d704f commit 4140999

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
- n/a
10+
### Removed
11+
12+
- Removed `lzma` compression option (#150)
1113

1214
## [1.1.1] – 2022-06-17
1315

libzim/libwrapper.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,6 @@ zim::Compression comp_from_int(int compValue)
172172
case 0:
173173
return zim::Compression::None;
174174
case 1:
175-
return zim::Compression::Lzma;
176-
case 2:
177175
return zim::Compression::Zstd;
178176
default:
179177
// Should we raise an error ?

libzim/libzim.pyx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,7 @@ class Compression(enum.Enum):
190190
# We don't care of the exact value. The function comp_from_int will do the right
191191
# conversion to zim::Compression
192192
none = 0
193-
lzma = 1
194-
zstd = 2
193+
zstd = 1
195194

196195

197196
class Hint(enum.Enum):

libzim/zim.pxd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ cdef extern from "zim/zim.h" namespace "zim":
3535
# We need to declare something here to be syntaxically correct
3636
# but we don't use those values (even if they are valid).
3737
None "zim::Compression::None"
38-
Lzma "zim::Compression::Lzma"
3938
Zstd "zim::Compression::Zstd"
4039

4140

tests/test_libzim_creator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def test_creator_nbworkers(fpath, lipsum_item, nb_workers):
254254

255255
def test_creator_combine_config(fpath, lipsum_item):
256256
with Creator(fpath).config_verbose(True).config_compression(
257-
"lzma"
257+
"zstd"
258258
).config_clustersize(1024).config_indexing(True, "eng").config_nbworkers(2) as c:
259259
c.add_item(lipsum_item)
260260

@@ -263,7 +263,7 @@ def test_creator_combine_config(fpath, lipsum_item):
263263
"name, args",
264264
[
265265
("verbose", (True,)),
266-
("compression", ("lzma",)),
266+
("compression", ("zstd",)),
267267
("clustersize", (1024,)),
268268
("indexing", (True, "eng")),
269269
("nbworkers", (2,)),

0 commit comments

Comments
 (0)