2 * Ceph - scalable distributed file system
4 * Copyright (C) 2015 Mirantis, Inc.
6 * Author: Alyona Kiseleva <akiselyova@mirantis.com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
15 #ifndef CEPH_COMPRESSION_PLUGIN_ZSTD_H
16 #define CEPH_COMPRESSION_PLUGIN_ZSTD_H
18 // -----------------------------------------------------------------------------
20 #include "compressor/CompressionPlugin.h"
21 #include "ZstdCompressor.h"
22 // -----------------------------------------------------------------------------
24 class CompressionPluginZstd : public CompressionPlugin {
28 explicit CompressionPluginZstd(CephContext* cct) : CompressionPlugin(cct)
31 int factory(CompressorRef *cs,
32 std::ostream *ss) override
34 if (compressor == 0) {
35 ZstdCompressor *interface = new ZstdCompressor();
36 compressor = CompressorRef(interface);