Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions

# Decompressor Class Reference

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

List of all members.

## Public Member Functions
| Decompressor ()
bool | decompress (Filename const source_file)
| Performs a foreground decompression of the named file; does not return until the decompression is complete.
bool | decompress (Ramfile source_and_dest_file)
| Does an in-memory decompression of the indicated Ramfile.
float | getProgress ()
| Returns the ratio through the decompression step in the background.
int | initiate (Filename const source_file)
| Begins a background decompression of the named file (whose filename must end in ".pz") to a new file without the .pz extension.
int | initiate (Filename const source_file, Filename const dest_file)
| Begins a background decompression from the named source file to the named destination file.
int | run ()
| Called each frame to do the next bit of work in the background task.

## Detailed Description

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

## Constructor & Destructor Documentation

Decompressor | ( |  | ) |

## Member Function Documentation

bool decompress | ( | Filename const | source_file | ) |

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

bool decompress | ( | Ramfile | source_and_dest_file | ) |

Does an in-memory decompression of the indicated Ramfile.

The decompressed contents are written back into the same Ramfile on completion.

float getProgress | ( |  | ) |

Returns the ratio through the decompression step in the background.

int initiate | ( | Filename const | source_file,
|  | Filename const | dest_file
| ) |  |

Begins a background decompression from the named source file to the named destination file.

The source file is removed after successful completion.

int initiate | ( | Filename const | source_file | ) |

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.

int run | ( |  | ) |

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.

All Classes Namespaces Functions Variables Enumerations Enumerator Properties