Public Member Functions | Static Public Attributes | List of all members
grepros.common.Decompressor Class Reference
Inheritance diagram for grepros.common.Decompressor:
Inheritance graph
[legend]

Public Member Functions

def decompress (cls, path, progress=False)
 
def is_compressed (cls, path)
 
def make_decompressed_name (cls, path)
 
def validate (cls)
 

Static Public Attributes

tuple EXTENSIONS = (".zst", ".zstd")
 Supported archive extensions. More...
 
string ZSTD_MAGIC = b"\x28\xb5\x2f\xfd"
 zstd file header magic start bytes More...
 

Detailed Description

Decompresses zstandard archives.

Definition at line 279 of file common.py.

Member Function Documentation

◆ 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.

Member Data Documentation

◆ 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:


grepros
Author(s): Erki Suurjaak
autogenerated on Sat Jan 6 2024 03:11:30