From e2e2e782d4136b20aec4d5a67e938db2bc414e04 Mon Sep 17 00:00:00 2001 From: asynts Date: Fri, 4 Sep 2020 14:30:53 +0200 Subject: [PATCH] Deflate: Fix deadly typo. --- Libraries/LibCompress/Deflate.cpp | 3 ++- Libraries/LibCompress/Gzip.cpp | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/LibCompress/Deflate.cpp b/Libraries/LibCompress/Deflate.cpp index 458096953e..ca04508be3 100644 --- a/Libraries/LibCompress/Deflate.cpp +++ b/Libraries/LibCompress/Deflate.cpp @@ -110,6 +110,7 @@ u32 DeflateDecompressor::CanonicalCode::read_symbol(InputBitStream& stream) cons for (;;) { code_bits = code_bits << 1 | stream.read_bits(1); + // FIXME: This seems really inefficent, this could be an index into an array instead. size_t index; if (AK::binary_search(m_symbol_codes.span(), code_bits, AK::integral_compare, &index)) return m_symbol_values[index]; @@ -405,7 +406,7 @@ void DeflateDecompressor::decode_codes(CanonicalCode& literal_code, Optional> Bytes { &header, sizeof(header) };