mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-11-04 12:59:07 +01:00
Add bootloader extension
This commit is contained in:
committed by
Kyle Schwarz
parent
4db27aa187
commit
6ac041cadc
@@ -0,0 +1,37 @@
|
||||
#ifndef __BOOTLOADER_FWZIP_H_
|
||||
#define __BOOTLOADER_FWZIP_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
namespace Bootloader {
|
||||
|
||||
class ZipHandle;
|
||||
|
||||
class FWZip {
|
||||
private:
|
||||
std::unique_ptr<ZipHandle> handle;
|
||||
std::vector<uint8_t> zipData;
|
||||
std::optional<size_t> uncompressedSize = std::nullopt;
|
||||
public:
|
||||
FWZip(std::vector<uint8_t>&& tagData);
|
||||
~FWZip();
|
||||
|
||||
std::optional<size_t> size() const { return uncompressedSize; }
|
||||
bool readAll(uint8_t* out);
|
||||
bool readAll(std::vector<uint8_t>& out);
|
||||
};
|
||||
|
||||
} // namespace Bootloader
|
||||
|
||||
} // namespace icsneo
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // __BOOTLOADER_FWZIP_H_
|
||||
Reference in New Issue
Block a user