mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:27:34 +00:00
LibCompress: Move XZ header validation into the read function
The constructor is now only concerned with creating the required streams, which means that it no longer fails for XZ streams with invalid headers. Instead, everything is parsed and validated during the first read, preparing us for files with multiple streams.
This commit is contained in:
parent
1f166b3a15
commit
00332c9b7d
3 changed files with 19 additions and 14 deletions
|
@ -108,10 +108,10 @@ public:
|
|||
virtual void close() override;
|
||||
|
||||
private:
|
||||
XzDecompressor(NonnullOwnPtr<CountingStream>, XzStreamFlags);
|
||||
XzDecompressor(NonnullOwnPtr<CountingStream>);
|
||||
|
||||
NonnullOwnPtr<CountingStream> m_stream;
|
||||
XzStreamFlags m_stream_flags;
|
||||
Optional<XzStreamFlags> m_stream_flags;
|
||||
bool m_found_stream_footer { false };
|
||||
|
||||
Optional<MaybeOwned<Stream>> m_current_block_stream {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue