mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-28 20:29:03 +00:00
LibCore+LibHTTP+LibGfx: Switch to LibCompress
This commit removes the only 3rd party library (and its usages) in serenity: puff, which is used for deflate decompression. and replaces it with the existing original serenity implementation in LibCompress. :^)
This commit is contained in:
parent
373a595c56
commit
c12781a6a2
Notes:
sideshowbarker
2024-07-18 21:44:21 +09:00
Author: https://github.com/IdanHo
Commit: c12781a6a2
Pull-request: https://github.com/SerenityOS/serenity/pull/5625
16 changed files with 31 additions and 1121 deletions
|
@ -31,6 +31,9 @@
|
|||
|
||||
namespace Compress {
|
||||
|
||||
constexpr u8 gzip_magic_1 = 0x1f;
|
||||
constexpr u8 gzip_magic_2 = 0x8b;
|
||||
|
||||
class GzipDecompressor final : public InputStream {
|
||||
public:
|
||||
GzipDecompressor(InputStream&);
|
||||
|
@ -43,6 +46,7 @@ public:
|
|||
bool unreliable_eof() const override;
|
||||
|
||||
static Optional<ByteBuffer> decompress_all(ReadonlyBytes);
|
||||
static bool is_likely_compressed(ReadonlyBytes bytes);
|
||||
|
||||
private:
|
||||
struct [[gnu::packed]] BlockHeader {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue