diff options
Diffstat (limited to 'src/lib/compression/compression.h')
-rw-r--r-- | src/lib/compression/compression.h | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/lib/compression/compression.h b/src/lib/compression/compression.h index 1c429195c..ad5ed45c5 100644 --- a/src/lib/compression/compression.h +++ b/src/lib/compression/compression.h @@ -30,12 +30,12 @@ class BOTAN_DLL Compression_Algorithm virtual void start(size_t comp_level = 0) = 0; /** - * Process some data. Input must be in size update_granularity() byte blocks. + * Process some data. Input must be in size update_granularity() uint8_t blocks. * @param buf in/out parameter which will possibly be resized or swapped * @param offset an offset into blocks to begin processing * @param flush if true the compressor will be told to flush state */ - virtual void update(secure_vector<byte>& buf, size_t offset = 0, bool flush = false) = 0; + virtual void update(secure_vector<uint8_t>& buf, size_t offset = 0, bool flush = false) = 0; /** * Finish compressing @@ -43,7 +43,7 @@ class BOTAN_DLL Compression_Algorithm * @param final_block in/out parameter * @param offset an offset into final_block to begin processing */ - virtual void finish(secure_vector<byte>& final_block, size_t offset = 0) = 0; + virtual void finish(secure_vector<uint8_t>& final_block, size_t offset = 0) = 0; /** * @return name of the compression algorithm @@ -72,11 +72,11 @@ class BOTAN_DLL Decompression_Algorithm virtual void start() = 0; /** - * Process some data. Input must be in size update_granularity() byte blocks. + * Process some data. Input must be in size update_granularity() uint8_t blocks. * @param buf in/out parameter which will possibly be resized or swapped * @param offset an offset into blocks to begin processing */ - virtual void update(secure_vector<byte>& buf, size_t offset = 0) = 0; + virtual void update(secure_vector<uint8_t>& buf, size_t offset = 0) = 0; /** * Finish decompressing @@ -84,7 +84,7 @@ class BOTAN_DLL Decompression_Algorithm * @param final_block in/out parameter * @param offset an offset into final_block to begin processing */ - virtual void finish(secure_vector<byte>& final_block, size_t offset = 0) = 0; + virtual void finish(secure_vector<uint8_t>& final_block, size_t offset = 0) = 0; /** * @return name of the decompression algorithm @@ -111,19 +111,19 @@ class Compression_Stream public: virtual ~Compression_Stream() {} - virtual void next_in(byte* b, size_t len) = 0; + virtual void next_in(uint8_t* b, size_t len) = 0; - virtual void next_out(byte* b, size_t len) = 0; + virtual void next_out(uint8_t* b, size_t len) = 0; virtual size_t avail_in() const = 0; virtual size_t avail_out() const = 0; - virtual u32bit run_flag() const = 0; - virtual u32bit flush_flag() const = 0; - virtual u32bit finish_flag() const = 0; + virtual uint32_t run_flag() const = 0; + virtual uint32_t flush_flag() const = 0; + virtual uint32_t finish_flag() const = 0; - virtual bool run(u32bit flags) = 0; + virtual bool run(uint32_t flags) = 0; }; /** @@ -132,20 +132,20 @@ class Compression_Stream class Stream_Compression : public Compression_Algorithm { public: - void update(secure_vector<byte>& buf, size_t offset, bool flush) final override; + void update(secure_vector<uint8_t>& buf, size_t offset, bool flush) final override; - void finish(secure_vector<byte>& buf, size_t offset) final override; + void finish(secure_vector<uint8_t>& buf, size_t offset) final override; void clear() final override; private: void start(size_t level) final override; - void process(secure_vector<byte>& buf, size_t offset, u32bit flags); + void process(secure_vector<uint8_t>& buf, size_t offset, uint32_t flags); virtual Compression_Stream* make_stream(size_t level) const = 0; - secure_vector<byte> m_buffer; + secure_vector<uint8_t> m_buffer; std::unique_ptr<Compression_Stream> m_stream; }; @@ -155,20 +155,20 @@ class Stream_Compression : public Compression_Algorithm class Stream_Decompression : public Decompression_Algorithm { public: - void update(secure_vector<byte>& buf, size_t offset) final override; + void update(secure_vector<uint8_t>& buf, size_t offset) final override; - void finish(secure_vector<byte>& buf, size_t offset) final override; + void finish(secure_vector<uint8_t>& buf, size_t offset) final override; void clear() final override; private: void start() final override; - void process(secure_vector<byte>& buf, size_t offset, u32bit flags); + void process(secure_vector<uint8_t>& buf, size_t offset, uint32_t flags); virtual Compression_Stream* make_stream() const = 0; - secure_vector<byte> m_buffer; + secure_vector<uint8_t> m_buffer; std::unique_ptr<Compression_Stream> m_stream; }; |