1
0
mirror of https://github.com/Amulet-Team/leveldb-mcpe.git synced 2024-11-24 01:46:16 +00:00
leveldb-amulet/include/leveldb/zstd_compressor.h

33 lines
633 B
C++

#pragma once
#include "leveldb/compressor.h"
namespace leveldb {
class DLLX ZstdCompressor : public Compressor
{
public:
static const int SERIALIZE_ID = 3;
const int compressionLevel;
virtual ~ZstdCompressor() {
}
ZstdCompressor(int compressionLevel = -1) :
Compressor(SERIALIZE_ID),
compressionLevel(compressionLevel)
{
assert(compressionLevel >= -1 && compressionLevel <= 9);
}
virtual void compressImpl(const char* input, size_t length, ::std::string& output) const override;
virtual bool decompress(const char* input, size_t length, ::std::string &output) const override;
private:
};
}