LibCompress: Decrease CanonicalCode's size on stack
This commit stores the bit codes as u16s instead of u32s as the maximum code bit length in DEFLATE is 15.
This commit is contained in:
parent
ab9f66a069
commit
02b4cb96f8
Notes:
sideshowbarker
2024-07-18 21:22:13 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/02b4cb96f8b Pull-request: https://github.com/SerenityOS/serenity/pull/5784 Issue: https://github.com/SerenityOS/serenity/issues/5778
1 changed files with 4 additions and 4 deletions
|
@ -49,12 +49,12 @@ public:
|
|||
|
||||
private:
|
||||
// Decompression - indexed by code
|
||||
Vector<u32> m_symbol_codes;
|
||||
Vector<u32> m_symbol_values;
|
||||
Vector<u16> m_symbol_codes;
|
||||
Vector<u16> m_symbol_values;
|
||||
|
||||
// Compression - indexed by symbol
|
||||
Array<u32, 288> m_bit_codes {}; // deflate uses a maximum of 288 symbols (maximum of 32 for distances)
|
||||
Array<u32, 288> m_bit_code_lengths {};
|
||||
Array<u16, 288> m_bit_codes {}; // deflate uses a maximum of 288 symbols (maximum of 32 for distances)
|
||||
Array<u16, 288> m_bit_code_lengths {};
|
||||
};
|
||||
|
||||
class DeflateDecompressor final : public InputStream {
|
||||
|
|
Loading…
Add table
Reference in a new issue