2013-06-05 01:56:07 +00:00
|
|
|
/*
|
|
|
|
exhal / inhal (de)compression routines
|
|
|
|
by Devin Acker
|
|
|
|
|
|
|
|
This code is released under the terms of the MIT license.
|
2013-10-22 21:02:37 +00:00
|
|
|
See COPYING.txt for details.
|
2013-06-05 01:56:07 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _COMPRESS_H
|
|
|
|
#define _COMPRESS_H
|
|
|
|
|
2013-10-26 18:25:23 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2013-06-05 01:56:07 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#define DATA_SIZE 65536
|
|
|
|
#define RUN_SIZE 32
|
|
|
|
#define LONG_RUN_SIZE 1024
|
|
|
|
|
2013-06-20 08:51:56 +00:00
|
|
|
size_t pack (uint8_t *unpacked, uint32_t inputsize, uint8_t *packed, int fast);
|
2013-06-05 01:56:07 +00:00
|
|
|
size_t unpack (uint8_t *packed, uint8_t *unpacked);
|
|
|
|
|
|
|
|
size_t unpack_from_file (FILE *file, unsigned int offset, uint8_t *unpacked);
|
|
|
|
|
2013-10-26 18:25:23 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// end include guard
|
2013-06-05 01:56:07 +00:00
|
|
|
#endif
|