mirror of
https://github.com/Amulet-Team/leveldb-mcpe.git
synced 2024-11-24 02:56:15 +00:00
0f37dce1ec
-added a compressor interface -added a zlib compressor -added windows support -added support to build as a DLL (sorry for the DLLX everywhere)
24 lines
475 B
C++
24 lines
475 B
C++
#pragma once
|
|
|
|
#include "compressor.h"
|
|
|
|
namespace leveldb {
|
|
class DLLX SnappyCompressor : public Compressor
|
|
{
|
|
public:
|
|
|
|
static const char SERIALIZE_ID = 1;
|
|
|
|
virtual ~SnappyCompressor() {}
|
|
|
|
SnappyCompressor() :
|
|
Compressor(SERIALIZE_ID) {
|
|
|
|
}
|
|
|
|
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;
|
|
};
|
|
}
|