1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:07:36 +00:00

LibCompress: Add a utility to GZIP compress an entire file

This is copy-pasted from the gzip utility, along with its existing TODO.
This is currently only needed by that utility, but this gives us API
symmetry with GzipDecompressor, and helps ensure we won't end up in a
situation where only one utility receives optimizations that should be
received by all interested parties.
This commit is contained in:
Timothy Flynn 2023-03-31 19:05:17 -04:00 committed by Andreas Kling
parent 857f559a06
commit 7ec91dfde7
2 changed files with 21 additions and 0 deletions

View file

@ -93,6 +93,7 @@ public:
virtual void close() override;
static ErrorOr<ByteBuffer> compress_all(ReadonlyBytes bytes);
static ErrorOr<void> compress_file(StringView input_file, NonnullOwnPtr<Stream> output_stream);
private:
MaybeOwned<Stream> m_output_stream;