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

LibArchive: Implement ZipOutputStream for zip archive creation

This output stream can be used to create zip archives, and will
be used in the implementation of the zip utility.
This commit is contained in:
Idan Horowitz 2021-03-22 21:53:12 +02:00 committed by Andreas Kling
parent 8eceef0b1b
commit 550ae23e80
2 changed files with 89 additions and 0 deletions

View file

@ -31,6 +31,7 @@
#include <AK/Span.h>
#include <AK/Stream.h>
#include <AK/String.h>
#include <AK/Vector.h>
#include <string.h>
namespace Archive {
@ -231,4 +232,17 @@ private:
ReadonlyBytes m_input_data;
};
class ZipOutputStream {
public:
ZipOutputStream(OutputStream&);
void add_member(const ZipMember&);
void finish();
private:
OutputStream& m_stream;
Vector<ZipMember> m_members;
bool m_finished { false };
};
}