| 1 |
#ifndef LIBCHDR_CODEC_CDLZ_H |
| 2 |
#define LIBCHDR_CODEC_CDLZ_H |
| 3 |
|
| 4 |
#include <stdint.h> |
| 5 |
|
| 6 |
#include "../include/libchdr/chd.h" |
| 7 |
#include "../include/libchdr/chdconfig.h" |
| 8 |
#include "codec_lzma.h" |
| 9 |
#include "codec_zlib.h" |
| 10 |
|
| 11 |
|
| 12 |
typedef struct _cdlz_codec_data cdlz_codec_data; |
| 13 |
struct _cdlz_codec_data { |
| 14 |
|
| 15 |
lzma_codec_data base_decompressor; |
| 16 |
#if WANT_SUBCODE |
| 17 |
zlib_codec_data subcode_decompressor; |
| 18 |
#endif |
| 19 |
uint8_t* buffer; |
| 20 |
}; |
| 21 |
|
| 22 |
|
| 23 |
chd_error cdlz_codec_init(void* codec, uint32_t hunkbytes); |
| 24 |
void cdlz_codec_free(void* codec); |
| 25 |
chd_error cdlz_codec_decompress(void *codec, const uint8_t *src, uint32_t complen, uint8_t *dest, uint32_t destlen); |
| 26 |
|
| 27 |
#endif |