blob: 295b180eb217ce86221cbbb49d4e05bc582d4ea6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2018 Intel Corporation
*
* Author: Qiaowei Ren <qiaowei.ren@intel.com>
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software
* Foundation. See file COPYING.
*
*/
#ifndef CEPH_QATACCEL_H
#define CEPH_QATACCEL_H
#include <qatzip.h>
#include "include/buffer.h"
class QatAccel {
QzSession_T session;
public:
QatAccel() : session({0}) {}
~QatAccel();
bool init(const std::string &alg);
int compress(const bufferlist &in, bufferlist &out);
int decompress(const bufferlist &in, bufferlist &out);
int decompress(bufferlist::const_iterator &p, size_t compressed_len, bufferlist &dst);
};
#endif
|