mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:07:35 +00:00
LibCompress: Reduce repeated code in the LZMA decompressor
This commit is contained in:
parent
afa158bf99
commit
d9627503a9
1 changed files with 1 additions and 7 deletions
|
@ -628,13 +628,7 @@ ErrorOr<Bytes> LzmaDecompressor::read_some(Bytes bytes)
|
|||
// MATCH/LITERAL symbol."
|
||||
update_state_after_short_rep();
|
||||
|
||||
u8 byte;
|
||||
auto read_bytes = TRY(m_dictionary->read_with_seekback({ &byte, sizeof(byte) }, m_rep0 + 1));
|
||||
VERIFY(read_bytes.size() == sizeof(byte));
|
||||
|
||||
auto written_bytes = m_dictionary->write({ &byte, sizeof(byte) });
|
||||
VERIFY(written_bytes == sizeof(byte));
|
||||
m_total_decoded_bytes++;
|
||||
TRY(copy_match_to_buffer(1));
|
||||
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue