summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCompress/Gzip.cpp
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2023-04-12 12:01:22 +0200
committerTim Flynn <trflynn89@pm.me>2023-04-12 07:33:15 -0400
commite11e7309dd396864f93657bda2b536138b866952 (patch)
tree56c3a8197479ed08fee08d1b0a2429f11fcc395c /Userland/Libraries/LibCompress/Gzip.cpp
parent8370377832193bf0486aeae4fe33937a328794bb (diff)
downloadserenity-e11e7309dd396864f93657bda2b536138b866952.zip
LibCompress: Replace usages of the Endian bytes accessor
Diffstat (limited to 'Userland/Libraries/LibCompress/Gzip.cpp')
-rw-r--r--Userland/Libraries/LibCompress/Gzip.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/Userland/Libraries/LibCompress/Gzip.cpp b/Userland/Libraries/LibCompress/Gzip.cpp
index e47f010272..5f00fbd683 100644
--- a/Userland/Libraries/LibCompress/Gzip.cpp
+++ b/Userland/Libraries/LibCompress/Gzip.cpp
@@ -231,10 +231,8 @@ ErrorOr<size_t> GzipCompressor::write_some(ReadonlyBytes bytes)
TRY(compressed_stream->final_flush());
Crypto::Checksum::CRC32 crc32;
crc32.update(bytes);
- LittleEndian<u32> digest = crc32.digest();
- LittleEndian<u32> size = bytes.size();
- TRY(m_output_stream->write_until_depleted(digest.bytes()));
- TRY(m_output_stream->write_until_depleted(size.bytes()));
+ TRY(m_output_stream->write_value<LittleEndian<u32>>(crc32.digest()));
+ TRY(m_output_stream->write_value<LittleEndian<u32>>(bytes.size()));
return bytes.size();
}