old-exhal/compress.h
devinacker e8fb851b50 fix up compress.h
so that it can be used with c++ more conveniently
2013-10-26 14:25:23 -04:00

34 lines
646 B
C

/*
exhal / inhal (de)compression routines
by Devin Acker
This code is released under the terms of the MIT license.
See COPYING.txt for details.
*/
#ifndef _COMPRESS_H
#define _COMPRESS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#define DATA_SIZE 65536
#define RUN_SIZE 32
#define LONG_RUN_SIZE 1024
size_t pack (uint8_t *unpacked, uint32_t inputsize, uint8_t *packed, int fast);
size_t unpack (uint8_t *packed, uint8_t *unpacked);
size_t unpack_from_file (FILE *file, unsigned int offset, uint8_t *unpacked);
#ifdef __cplusplus
}
#endif
// end include guard
#endif