grepros 1.3.0
grep for ROS bag files and live topics
Loading...
Searching...
No Matches
Decompressor Class Reference
Inheritance diagram for Decompressor:
Inheritance graph

Public Member Functions

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

Static Public Attributes

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

Detailed Description

Decompresses zstandard archives.

Definition at line 458 of file common.py.

Member Function Documentation

◆ decompress()

decompress (   cls,
  path,
  progress = False 
)
Decompresses file to same directory, showing optional progress bar.

@return  uncompressed file path

Definition at line 469 of file common.py.

◆ is_compressed()

is_compressed (   cls,
  path 
)
Returns whether file is a recognized archive.

Definition at line 503 of file common.py.

◆ make_decompressed_name()

make_decompressed_name (   cls,
  path 
)
Returns the path without archive extension, if any.

Definition at line 515 of file common.py.

◆ validate()

validate (   cls)
Raises error if decompression library not available.

Definition at line 521 of file common.py.

Member Data Documentation

◆ EXTENSIONS

tuple EXTENSIONS = (".zst", ".zstd")
static

Supported archive extensions.

Definition at line 462 of file common.py.

◆ ZSTD_MAGIC

str ZSTD_MAGIC = b"\x28\xb5\x2f\xfd"
static

zstd file header magic start bytes

Definition at line 465 of file common.py.


The documentation for this class was generated from the following file: