mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 06:40:05 +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
Notes:
sideshowbarker
2024-07-18 21:07:42 +09:00
Author: https://github.com/IdanHo
Commit: 550ae23e80
Pull-request: https://github.com/SerenityOS/serenity/pull/5917
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