aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/compression
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/compression')
-rw-r--r--src/lib/compression/compression.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/compression/compression.cpp b/src/lib/compression/compression.cpp
index 6057f9408..22ee700b6 100644
--- a/src/lib/compression/compression.cpp
+++ b/src/lib/compression/compression.cpp
@@ -104,8 +104,8 @@ void Stream_Compression::process(secure_vector<byte>& buf, size_t offset, u32bit
if(m_buffer.size() < buf.size() + offset)
m_buffer.resize(buf.size() + offset);
- m_stream->next_in(&buf[offset], buf.size() - offset);
- m_stream->next_out(&m_buffer[offset], m_buffer.size() - offset);
+ m_stream->next_in(buf.data() + offset, buf.size() - offset);
+ m_stream->next_out(m_buffer.data() + offset, m_buffer.size() - offset);
while(true)
{
@@ -115,7 +115,7 @@ void Stream_Compression::process(secure_vector<byte>& buf, size_t offset, u32bit
{
const size_t added = 8 + m_buffer.size();
m_buffer.resize(m_buffer.size() + added);
- m_stream->next_out(&m_buffer[m_buffer.size() - added], added);
+ m_stream->next_out(m_buffer.data() + m_buffer.size() - added, added);
}
else if(m_stream->avail_in() == 0)
{
@@ -170,8 +170,8 @@ void Stream_Decompression::process(secure_vector<byte>& buf, size_t offset, u32b
if(m_buffer.size() < buf.size() + offset)
m_buffer.resize(buf.size() + offset);
- m_stream->next_in(&buf[offset], buf.size() - offset);
- m_stream->next_out(&m_buffer[offset], m_buffer.size() - offset);
+ m_stream->next_in(buf.data() + offset, buf.size() - offset);
+ m_stream->next_out(m_buffer.data() + offset, m_buffer.size() - offset);
while(true)
{
@@ -189,14 +189,14 @@ void Stream_Decompression::process(secure_vector<byte>& buf, size_t offset, u32b
// More data follows: try to process as a following stream
const size_t read = (buf.size() - offset) - m_stream->avail_in();
start();
- m_stream->next_in(&buf[offset + read], buf.size() - offset - read);
+ m_stream->next_in(buf.data() + offset + read, buf.size() - offset - read);
}
if(m_stream->avail_out() == 0)
{
const size_t added = 8 + m_buffer.size();
m_buffer.resize(m_buffer.size() + added);
- m_stream->next_out(&m_buffer[m_buffer.size() - added], added);
+ m_stream->next_out(m_buffer.data() + m_buffer.size() - added, added);
}
else if(m_stream->avail_in() == 0)
{