grepros 1.2.2
grep for ROS bag files and live topics
Loading...
Searching...
No Matches
Decompressor Class Reference

Decompresses zstandard archives. More...

Public Member Functions

 decompress (cls, path, progress=False)
 Decompresses file to same directory, showing optional progress bar.
 
 is_compressed (cls, path)
 Returns whether file is a recognized archive.
 
 make_decompressed_name (cls, path)
 Returns the path without archive extension, if any.
 
 validate (cls)
 Raises error if decompression library not available.
 

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 469 of file common.py.

Member Function Documentation

◆ decompress()

decompress (   cls,
  path,
  progress = False 
)

Decompresses file to same directory, showing optional progress bar.

Returns
uncompressed file path

Definition at line 485 of file common.py.

◆ is_compressed()

is_compressed (   cls,
  path 
)

Returns whether file is a recognized archive.

Definition at line 514 of file common.py.

◆ make_decompressed_name()

make_decompressed_name (   cls,
  path 
)

Returns the path without archive extension, if any.

Definition at line 526 of file common.py.

◆ validate()

validate (   cls)

Raises error if decompression library not available.

Definition at line 532 of file common.py.

Member Data Documentation

◆ EXTENSIONS

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

Supported archive extensions.

Definition at line 473 of file common.py.

◆ ZSTD_MAGIC

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

zstd file header magic start bytes

Definition at line 476 of file common.py.


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