Decompresses zstandard archives.
Definition at line 279 of file common.py.
◆ decompress()
def grepros.common.Decompressor.decompress |
( |
|
cls, |
|
|
|
path, |
|
|
|
progress = False |
|
) |
| |
Decompresses file to same directory, showing optional progress bar.
@return uncompressed file path
Definition at line 290 of file common.py.
◆ is_compressed()
def grepros.common.Decompressor.is_compressed |
( |
|
cls, |
|
|
|
path |
|
) |
| |
Returns whether file is a recognized archive.
Definition at line 324 of file common.py.
◆ make_decompressed_name()
def grepros.common.Decompressor.make_decompressed_name |
( |
|
cls, |
|
|
|
path |
|
) |
| |
Returns the path without archive extension, if any.
Definition at line 336 of file common.py.
◆ validate()
def grepros.common.Decompressor.validate |
( |
|
cls | ) |
|
Raises error if decompression library not available.
Definition at line 342 of file common.py.
◆ EXTENSIONS
tuple grepros.common.Decompressor.EXTENSIONS = (".zst", ".zstd") |
|
static |
Supported archive extensions.
Definition at line 283 of file common.py.
◆ ZSTD_MAGIC
string grepros.common.Decompressor.ZSTD_MAGIC = b"\x28\xb5\x2f\xfd" |
|
static |
zstd file header magic start bytes
Definition at line 286 of file common.py.
The documentation for this class was generated from the following file: