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:
parent
857f559a06
commit
7ec91dfde7
2 changed files with 21 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue