#ifndef H_CORAL_IO_COMPRESSION_SUPPORT
#define H_CORAL_IO_COMPRESSION_SUPPORT
// This file is part of the Coral project.
// Please read the copyright notice in the LICENSE file.

#include <coral/coral.h>

#include <sys/types.h>
#include <string>

NAMESPACE_BEGIN(coral);
NAMESPACE_BEGIN(io);

class CompressionSupport {
 private:
	std::string filename;
	bool fake;
	pid_t childpid;
	int getTempFile();
	std::string loadable_filename;
	void wait_for_child();
 public:
	bool wasCompressed() throw ();
	CompressionSupport(const char* filename);
	~CompressionSupport() throw ();
	std::string getLoadableFilename();
};
NAMESPACE_END();
NAMESPACE_END();
#endif
