mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:58:11 +00:00
LibCore: Move puff() from LibDraw to LibCore
Since it's used both by CGzip and PNGLoader, it seems most appropriate to keep this in LibCore.
This commit is contained in:
parent
600c15aa3a
commit
35c26a06fc
6 changed files with 6 additions and 7 deletions
|
@ -1,12 +1,11 @@
|
|||
#include "CGzip.h"
|
||||
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <LibCore/puff.h>
|
||||
#include <LibCore/puff.c>
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <LibDraw/puff.h>
|
||||
|
||||
bool CGzip::is_compressed(const ByteBuffer& data)
|
||||
{
|
||||
return data.size() > 2 && data[0] == 0x1F && data[1] == 0x8b;
|
||||
|
@ -120,4 +119,4 @@ Optional<ByteBuffer> CGzip::decompress(const ByteBuffer& data)
|
|||
}
|
||||
|
||||
return destination;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue