1
0
mirror of https://github.com/borgesdan/xn65 synced 2024-12-29 21:54:47 +01:00

45 lines
870 B
C++
Raw Permalink Normal View History

2024-06-03 21:55:09 -03:00
#include "xna/content/lzx/decoder.hpp"
2024-09-06 22:23:32 -03:00
//#include "libmspack/mspack.h"
//#include "libmspack/lzx.h"
2024-05-01 19:09:43 -03:00
namespace xna {
2024-06-04 14:37:28 -03:00
LzxDecoder::LzxDecoder(int window) {
if (window < 15 || window > 21)
return;
2024-05-01 19:09:43 -03:00
2024-06-04 14:37:28 -03:00
window_bits = window;
}
int LzxDecoder::Decompress(Stream* inData, int inLen, Stream* outData, int outLen) {
2024-09-06 22:23:32 -03:00
/*mspack_file* input = nullptr;
mspack_file* output = nullptr;
2024-06-04 14:37:28 -03:00
auto lzxstream = lzxd_init(
2024-09-06 22:23:32 -03:00
struct mspack_system* system,
2024-06-04 14:37:28 -03:00
nullptr,
2024-09-06 22:23:32 -03:00
struct mspack_file* input,
2024-06-04 14:37:28 -03:00
input + inData->Position(),
2024-09-06 22:23:32 -03:00
struct mspack_file* output,
2024-06-04 14:37:28 -03:00
output + outData->Position(),
2024-09-06 22:23:32 -03:00
int window_bits,
2024-06-04 14:37:28 -03:00
window_bits,
2024-09-06 22:23:32 -03:00
int reset_interval,
2024-06-04 14:37:28 -03:00
0,
2024-09-06 22:23:32 -03:00
int input_buffer_size,
2024-06-04 14:37:28 -03:00
inLen,
2024-09-06 22:23:32 -03:00
off_t output_length,
2024-06-04 14:37:28 -03:00
outLen,
2024-09-06 22:23:32 -03:00
char is_delta
2024-06-04 14:37:28 -03:00
0
);
auto result = lzxd_decompress(
2024-09-06 22:23:32 -03:00
struct lzxd_stream* lzx,
2024-06-04 14:37:28 -03:00
lzxstream,
2024-09-06 22:23:32 -03:00
off_t out_bytes
2024-06-04 14:37:28 -03:00
0
2024-09-06 22:23:32 -03:00
);*/
2024-06-04 14:37:28 -03:00
2024-09-06 22:23:32 -03:00
return 0;
2024-06-04 14:37:28 -03:00
}
2024-05-01 19:09:43 -03:00
}