#include <filecomp.h>
Public Member Functions | |
virtual | ~Compressor () |
Destructor. | |
virtual bool | compress (char const *path, int level)=0 |
Compresses a file. | |
virtual char const * | extension () const =0 |
Returns the extension appended to compressed files. | |
Static Public Attributes | |
static modules::PSIID const | IID = 0x425f77ee |
Interface ID. |
You must override the compress() and extension() functions in derived classes.
Modules must provide objects of this interface class through the Module::factory() function.
virtual bool filecomp::Compressor::compress | ( | char const * | path, | |
int | level | |||
) | [pure virtual] |
Compresses a file.
[in] | path | The absolute path to the file to compress. The file must not be modified or deleted. The compressed file will have the same name but with an appropriate extension for the compression scheme used. |
[in] | level | The compression level, from 1 (faster) to 9 (better ratio). Use the value 0 to use an implementation-defined default value. Implementers will make their best to adapt the compression level as appropriate for the used compression scheme. |
virtual char const* filecomp::Compressor::extension | ( | ) | const [pure virtual] |
Returns the extension for compressed files appended to the original file by the compress() function.