qualcomm/qbox
Loading...
Searching...
No Matches
zip_loader.h
1/*
2 * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All Rights Reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef _QBOX_ZIP_LOADER_H
8#define _QBOX_ZIP_LOADER_H
9
10#include <cstddef>
11#include <cstdint>
12#include <string>
13#include <vector>
14
15struct zip;
16typedef struct zip zip_t;
17
18namespace gs {
19
20zip_t* zip_open_from_memory(const void* data, std::size_t size);
21
32std::vector<uint8_t> zip_extract(zip_t* archive, const std::string& archive_name, const std::string& file_name = "",
33 uint64_t file_offset = 0, uint64_t file_data_len = 0);
34
50std::vector<uint8_t> zip_extract_nested(zip_t* archive, const std::string& archive_name,
51 const std::string& compressed_file_name, const std::string& inner_file_name,
52 uint64_t file_offset = 0, uint64_t file_data_len = 0);
53
54} // namespace gs
55
56#endif
Tool which reads a Lua configuration file and sets parameters.
Definition biflow.cc:10
std::vector< uint8_t > zip_extract_nested(zip_t *archive, const std::string &archive_name, const std::string &compressed_file_name, const std::string &inner_file_name, uint64_t file_offset=0, uint64_t file_data_len=0)
Extract compressed data from a nested zip archive.
Definition zip_loader.cc:97
std::vector< uint8_t > zip_extract(zip_t *archive, const std::string &archive_name, const std::string &file_name="", uint64_t file_offset=0, uint64_t file_data_len=0)
Extract data from a zip archive.
Definition zip_loader.cc:57