ZipArchive
Overview
ZipArchive is a class in Aspose.Cells FOSS for C++.
This class provides 5 methods for working with ZipArchive objects in C++ programs.
Available methods include: AddEntry, FromZipBytes, GetEntry, GetEntryCount, ToZipBytes.
All public members are accessible to any C++ application after installing the Aspose.Cells FOSS for C++ package.
Methods
| Signature | Description |
|---|---|
FromZipBytes(zipData: std::vector<uint8_t>) → ZipArchive | Parses a ZIP archive from raw bytes. Throws std::runtime_error on invalid or corrupt data. |
ToZipBytes() → std::vector<uint8_t> | Serializes this archive to ZIP bytes using STORED (no compression). |
GetEntry(uri: std::string_view) → ZipArchiveEntry | Gets an entry by URI. The URI is normalized (leading ‘/’ stripped, backslashes replaced). Returns a null ZipArchiveEntry if not found. |
AddEntry(uri: std::string_view, data: std::vector<uint8_t>) | Adds or replaces an entry. |
GetEntryCount() → size_t | Gets the number of entries. |