]> git.proxmox.com Git - ceph.git/blame - ceph/src/compressor/zlib/ZlibCompressor.h
buildsys: fix parallel builds
[ceph.git] / ceph / src / compressor / zlib / ZlibCompressor.h
CommitLineData
7c673cae
FG
1// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2// vim: ts=8 sw=2 smarttab
3/*
4 * Ceph - scalable distributed file system
5 *
6 * Copyright (C) 2015 Mirantis, Inc.
7 *
8 * Author: Alyona Kiseleva <akiselyova@mirantis.com>
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
14 *
15 */
16
17#ifndef CEPH_COMPRESSION_ZLIB_H
18#define CEPH_COMPRESSION_ZLIB_H
19
20#include "compressor/Compressor.h"
21
22class ZlibCompressor : public Compressor {
23 bool isal_enabled;
24public:
25 ZlibCompressor(bool isal) : Compressor(COMP_ALG_ZLIB, "zlib"), isal_enabled(isal) {}
26
27 int compress(const bufferlist &in, bufferlist &out) override;
28 int decompress(const bufferlist &in, bufferlist &out) override;
29 int decompress(bufferlist::iterator &p, size_t compressed_len, bufferlist &out) override;
30private:
31 int zlib_compress(const bufferlist &in, bufferlist &out);
32 int isal_compress(const bufferlist &in, bufferlist &out);
33 };
34
35
36#endif