aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/compression/compression.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-05-10 02:33:00 +0000
committerlloyd <[email protected]>2015-05-10 02:33:00 +0000
commita08c16ef5f5fa85ab8b46c2fcbeca2c1b40fa339 (patch)
tree7623a51e07a9bcf3fe57cdb4536a983c4a4ebb15 /src/lib/compression/compression.h
parent9dfc6fdb2adc00ec1aac3099d60883d473943bb7 (diff)
Change `make_compressor` and `make_decompressor` to return a
compression type instead of the base transform class. Add some final annotations.
Diffstat (limited to 'src/lib/compression/compression.h')
-rw-r--r--src/lib/compression/compression.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/compression/compression.h b/src/lib/compression/compression.h
index f70252cbe..62525dcc9 100644
--- a/src/lib/compression/compression.h
+++ b/src/lib/compression/compression.h
@@ -15,25 +15,25 @@ namespace Botan {
class BOTAN_DLL Compressor_Transform : public Transform
{
public:
- size_t update_granularity() const override { return 1; }
+ size_t update_granularity() const override final { return 1; }
- size_t minimum_final_size() const override { return 0; }
+ size_t minimum_final_size() const override final { return 0; }
- size_t default_nonce_length() const override { return 0; }
+ size_t default_nonce_length() const override final { return 0; }
- bool valid_nonce_length(size_t nonce_len) const override
+ bool valid_nonce_length(size_t nonce_len) const override final
{ return nonce_len == 0; }
virtual void flush(secure_vector<byte>& buf, size_t offset = 0) { update(buf, offset); }
- size_t output_length(size_t) const override
+ size_t output_length(size_t) const override final
{
throw std::runtime_error(name() + " output length indeterminate");
}
};
-BOTAN_DLL Transform* make_compressor(const std::string& type, size_t level);
-BOTAN_DLL Transform* make_decompressor(const std::string& type);
+BOTAN_DLL Compressor_Transform* make_compressor(const std::string& type, size_t level);
+BOTAN_DLL Compressor_Transform* make_decompressor(const std::string& type);
class Compression_Stream
{