proxygen
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
ZstdStreamDecompressor.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015-present, Facebook, Inc.
3
* All rights reserved.
4
*
5
* This source code is licensed under the BSD-style license found in the
6
* LICENSE file in the root directory of this source tree. An additional grant
7
* of patent rights can be found in the PATENTS file in the same directory.
8
*
9
*/
10
#pragma once
11
12
// We need access to zstd internals (to read frame headers etc.)
13
#ifndef ZSTD_STATIC_LINKING_ONLY
14
#define ZSTD_STATIC_LINKING_ONLY
15
#define ZDICT_STATIC_LINKING_ONLY
16
#endif
17
18
#include <memory>
19
#include <zstd.h>
20
#include <zdict.h>
21
22
namespace
folly
{
23
class
IOBuf;
24
}
25
26
namespace
proxygen
{
27
28
enum class
ZstdStatusType
: int {
29
NONE
,
30
SUCCESS
,
31
NODICT
,
32
CONTINUE,
33
ERROR
,
34
};
35
36
37
class
ZstdStreamDecompressor
{
38
public
:
39
explicit
ZstdStreamDecompressor
(
size_t
,
std::string
);
40
~
ZstdStreamDecompressor
();
41
std::unique_ptr<folly::IOBuf> decompress(
const
folly::IOBuf
* in);
42
ZstdStatusType
getStatus() {
return
status_;};
43
ZstdStatusType
status_
;
44
45
private
:
46
ZSTD_DStream *dStream_{
nullptr
};
47
ZSTD_DDict* dDict_{
nullptr
};
48
size_t
totalLen_{0};
49
size_t
totalDec_{0};
50
};
51
}
folly::IOBuf
Definition:
IOBuf.h:221
proxygen::ZstdStreamDecompressor::status_
ZstdStatusType status_
Definition:
ZstdStreamDecompressor.h:42
folly
—— Concurrent Priority Queue Implementation ——
Definition:
AtomicBitSet.h:29
proxygen::ZstdStatusType::NODICT
proxygen::ZstdStatusType
ZstdStatusType
Definition:
ZstdStreamDecompressor.h:28
folly::WriteFlags::NONE
proxygen::ZstdStreamDecompressor
Definition:
ZstdStreamDecompressor.h:37
proxygen::ZstdStatusType::ERROR
string
const char * string
Definition:
Conv.cpp:212
proxygen
Definition:
ExMessageHandler.h:14
folly::ConversionCode::SUCCESS
proxygen
lib
utils
ZstdStreamDecompressor.h
Generated by
1.8.11