Skip to content

Commit 9dbc2c3

Browse files
committed
zstd fast and mid
1 parent 590c032 commit 9dbc2c3

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

src/compression/__init__.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,31 @@
55
from .zstd import ZstdCompressor
66
from .gzip import GzipCompressor
77

8+
9+
class ZstdFastCompressor(ZstdCompressor):
10+
"""Zstandard at level 3 - fast compression."""
11+
12+
name = "zstd_fast"
13+
14+
def __init__(self):
15+
super().__init__(level=3)
16+
17+
18+
class ZstdMidCompressor(ZstdCompressor):
19+
"""Zstandard at level 6 - balanced compression."""
20+
21+
name = "zstd_mid"
22+
23+
def __init__(self):
24+
super().__init__(level=6)
25+
26+
827
# Registry of available compressors
928
COMPRESSORS: dict[str, type[Compressor]] = {
1029
"none": NoCompression,
1130
"zstd": ZstdCompressor,
31+
"zstd_fast": ZstdFastCompressor,
32+
"zstd_mid": ZstdMidCompressor,
1233
"gzip": GzipCompressor,
1334
}
1435

0 commit comments

Comments
 (0)