panda3d.core.Decompressor

from panda3d.core import Decompressor
class Decompressor

This manages run-time decompression of a zlib-compressed stream, as a background or foreground task.

Inheritance diagram

Inheritance diagram of Decompressor

__init__() → None
__init__(param0: Decompressor) → None
decompress(source_file: Filename) → bool

Performs a foreground decompression of the named file; does not return until the decompression is complete.

decompress(source_and_dest_file: Ramfile) → bool

Does an in-memory decompression of the indicated Ramfile. The decompressed contents are written back into the same Ramfile on completion.

getProgress() → float

Returns the ratio through the decompression step in the background.

initiate(source_file: Filename) → int

Begins a background decompression of the named file (whose filename must end in “.pz”) to a new file without the .pz extension. The source file is removed after successful completion.

initiate(source_file: Filename, dest_file: Filename) → int

Begins a background decompression from the named source file to the named destination file. The source file is removed after successful completion.

property progress

Returns the ratio through the decompression step in the background.

Return type

float

run() → int

Called each frame to do the next bit of work in the background task. Returns EU_ok if a chunk is completed but there is more to go, or EU_success when we’re all done. Any other return value indicates an error.