mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:07:34 +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:
parent
8eceef0b1b
commit
550ae23e80
2 changed files with 89 additions and 0 deletions
|
@ -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 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue