summaryrefslogtreecommitdiff
path: root/lib/bk_zip/bk_unzip.h
blob: 0a53edd2641be050d3480ea670b67fce46ebe0c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef BK_UNZIP_H
#define BK_UNZIP_H

#include <vector>
#include <cstdint>
#include <utility>

namespace BK64 {

/**
 * Decompresses a buffer with a Banjo-Kazooie header format
 *
 * @param in_buffer Input compressed data with BK header (starting with 0x11, 0x72)
 * @param size Size of the buffer (input as compressed size, output as decompressed size)
 * @return Decompressed data as vector of bytes
 * @throws std::runtime_error if decompression fails or header is invalid
 */
uint8_t* bk_unzip(const uint8_t* in_buffer, uint32_t* size);

} // namespace BK64

#endif // BK_UNZIP_H