db/simple: compress the database file using gzip

This commit is contained in:
Max Kellermann
2014-08-11 21:30:49 +02:00
parent 486b5b6bfc
commit 2e122e1509
4 changed files with 73 additions and 5 deletions

View File

@@ -20,6 +20,7 @@
#ifndef MPD_SIMPLE_DATABASE_PLUGIN_HXX
#define MPD_SIMPLE_DATABASE_PLUGIN_HXX
#include "check.h"
#include "db/Interface.hxx"
#include "fs/AllocatedPath.hxx"
#include "db/LightSong.hxx"
@@ -38,6 +39,10 @@ class SimpleDatabase : public Database {
AllocatedPath path;
std::string path_utf8;
#ifdef HAVE_ZLIB
bool compress;
#endif
/**
* The path where cache files for Mount() are located.
*/
@@ -64,7 +69,7 @@ class SimpleDatabase : public Database {
SimpleDatabase();
SimpleDatabase(AllocatedPath &&_path);
SimpleDatabase(AllocatedPath &&_path, bool _compress);
public:
static Database *Create(EventLoop &loop, DatabaseListener &listener,