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;
|
|
};
|
|
}
|