#include <decompressor.h>
Public Member Functions | |
Decompressor () | |
~Decompressor () | |
int | initiate (const Filename &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 (const Filename &source_file, const Filename &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. | |
bool | decompress (const Filename &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 | get_progress () const |
Returns the ratio through the decompression step in the background. | |
Private Member Functions | |
void | cleanup (void) |
Called to reset a previous decompressor state and clean up properly. | |
Private Attributes | |
Filename | _source_filename |
istream * | _source |
istream * | _decompress |
ostream * | _dest |
size_t | _source_length |
Definition at line 41 of file decompressor.h.
|
Definition at line 45 of file decompressor.cxx. References cleanup(). |
|
Definition at line 59 of file decompressor.cxx. References dest_file, Filename::get_extension(), Filename::get_fullpath_wo_extension(), and initiate(). |
|
Called to reset a previous decompressor state and clean up properly.
Definition at line 305 of file decompressor.cxx. Referenced by Decompressor(). |
|
Does an in-memory decompression of the indicated Ramfile. The decompressed contents are written back into the same Ramfile on completion. Definition at line 252 of file decompressor.cxx. References _source_length. |
|
Performs a foreground decompression of the named file; does not return until the decompression is complete.
Definition at line 221 of file decompressor.cxx. |
|
Returns the ratio through the decompression step in the background.
Definition at line 280 of file decompressor.cxx. |
|
Begins a background decompression from the named source file to the named destination file. The source file is removed after successful completion. Definition at line 107 of file decompressor.cxx. References _source_length, and EU_error_file_empty. |
|
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. Definition at line 78 of file decompressor.cxx. References EU_error_abort. Referenced by ~Decompressor(). |
|
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. Definition at line 180 of file decompressor.cxx. References EU_success. |
|
Definition at line 61 of file decompressor.h. |
|
Definition at line 62 of file decompressor.h. |
|
Definition at line 60 of file decompressor.h. |
|
Definition at line 58 of file decompressor.h. |
|
Definition at line 64 of file decompressor.h. Referenced by decompress(), and initiate(). |