mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:57:45 +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
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