Botan: src/filters/bzip2/bzip2.h Source File

Botan 1.10.16

bzip2.h
Go to the documentation of this file.
1 /*
2 * Bzip Compressor
3 * (C) 2001 Peter J Jones
4 * 2001-2007 Jack Lloyd
5 *
6 * Distributed under the terms of the Botan license
7 */
8
9 #ifndef BOTAN_BZIP2_H__
10 #define BOTAN_BZIP2_H__
11
12 #include <botan/filter.h>
13
14 namespace Botan {
15
16 /**
17 * Bzip Compression Filter
18 */
19 class BOTAN_DLL Bzip_Compression : public Filter
20 {
21 public:
22 std::string name() const { return "Bzip_Compression"; }
23
24 void write(const byte input[], size_t length);
25 void start_msg();
26 void end_msg();
27
28 void flush();
29
30 Bzip_Compression(size_t = 9);
31 ~Bzip_Compression() { clear(); }
32 private:
33 void clear();
34
35 const size_t level;
36 SecureVector<byte> buffer;
37 class Bzip_Stream* bz;
38 };
39
40 /**
41 * Bzip Decompression Filter
42 */
43 class BOTAN_DLL Bzip_Decompression : public Filter
44 {
45 public:
46 std::string name() const { return "Bzip_Decompression"; }
47
48 void write(const byte input[], size_t length);
49 void start_msg();
50 void end_msg();
51
52 Bzip_Decompression(bool = false);
53 ~Bzip_Decompression() { clear(); }
54 private:
55 void clear();
56
57 const bool small_mem;
58 SecureVector<byte> buffer;
59 class Bzip_Stream* bz;
60 bool no_writes;
61 };
62
63 }
64
65 #endif
Botan::Bzip_Compression::name
std::string name() const
Definition: bzip2.h:22
Botan::byte
unsigned char byte
Definition: types.h:22
Botan::Bzip_Decompression::~Bzip_Decompression
~Bzip_Decompression()
Definition: bzip2.h:53
Botan::Filter
Definition: filter.h:19
Botan::Bzip_Compression
Definition: bzip2.h:19
Botan
Definition: algo_base.h:14
Botan::Bzip_Decompression
Definition: bzip2.h:43
Botan::SecureVector< byte >
Botan::Bzip_Compression::~Bzip_Compression
~Bzip_Compression()
Definition: bzip2.h:31
Botan::Bzip_Decompression::name
std::string name() const
Definition: bzip2.h:46