aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/compression/zlib
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-12-11 15:28:38 -0500
committerJack Lloyd <[email protected]>2016-12-18 16:48:24 -0500
commitf3cb3edb512bdcab498d825886c3366c341b3f78 (patch)
tree645c73ec295a5a34f25d99903b6d9fa9751e86d3 /src/lib/compression/zlib
parentc1dd21253c1f3188ff45d3ad47698efd08235ae8 (diff)
Convert to using standard uintN_t integer types
Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them.
Diffstat (limited to 'src/lib/compression/zlib')
-rw-r--r--src/lib/compression/zlib/zlib.cpp12
-rw-r--r--src/lib/compression/zlib/zlib.h4
2 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/compression/zlib/zlib.cpp b/src/lib/compression/zlib/zlib.cpp
index 27ae6fb20..2bfd22928 100644
--- a/src/lib/compression/zlib/zlib.cpp
+++ b/src/lib/compression/zlib/zlib.cpp
@@ -27,9 +27,9 @@ class Zlib_Stream : public Zlib_Style_Stream<z_stream, Bytef>
streamp()->zfree = Compression_Alloc_Info::free;
}
- u32bit run_flag() const override { return Z_NO_FLUSH; }
- u32bit flush_flag() const override { return Z_SYNC_FLUSH; }
- u32bit finish_flag() const override { return Z_FINISH; }
+ uint32_t run_flag() const override { return Z_NO_FLUSH; }
+ uint32_t flush_flag() const override { return Z_SYNC_FLUSH; }
+ uint32_t finish_flag() const override { return Z_FINISH; }
int compute_window_bits(int wbits, int wbits_offset) const
{
@@ -63,7 +63,7 @@ class Zlib_Compression_Stream : public Zlib_Stream
::deflateEnd(streamp());
}
- bool run(u32bit flags) override
+ bool run(uint32_t flags) override
{
int rc = ::deflate(streamp(), flags);
@@ -94,7 +94,7 @@ class Zlib_Decompression_Stream : public Zlib_Stream
::inflateEnd(streamp());
}
- bool run(u32bit flags) override
+ bool run(uint32_t flags) override
{
int rc = ::inflate(streamp(), flags);
@@ -123,7 +123,7 @@ class Deflate_Decompression_Stream : public Zlib_Decompression_Stream
class Gzip_Compression_Stream : public Zlib_Compression_Stream
{
public:
- Gzip_Compression_Stream(size_t level, int wbits, byte os_code) :
+ Gzip_Compression_Stream(size_t level, int wbits, uint8_t os_code) :
Zlib_Compression_Stream(level, wbits, 16)
{
clear_mem(&m_header, 1);
diff --git a/src/lib/compression/zlib/zlib.h b/src/lib/compression/zlib/zlib.h
index 0cedb1eab..a2cae34f4 100644
--- a/src/lib/compression/zlib/zlib.h
+++ b/src/lib/compression/zlib/zlib.h
@@ -63,12 +63,12 @@ class BOTAN_DLL Deflate_Decompression final : public Stream_Decompression
class BOTAN_DLL Gzip_Compression final : public Stream_Compression
{
public:
- Gzip_Compression(byte os_code = 255) : m_os_code(os_code) {}
+ Gzip_Compression(uint8_t os_code = 255) : m_os_code(os_code) {}
std::string name() const override { return "Gzip_Compression"; }
private:
Compression_Stream* make_stream(size_t level) const override;
- const byte m_os_code;
+ const uint8_t m_os_code;
};
/**