-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqfs.h
More file actions
32 lines (25 loc) · 915 Bytes
/
qfs.h
File metadata and controls
32 lines (25 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
* Library interface for compressing and decompressing assets
* using the RefPack compression algorithm.
*
* This file (with the exception of some parts adapted from zlib) is
* Copyright 2007 Ben Rudiak-Gould. Anyone may use it under the terms of
* the GNU General Public License, version 2 or (at your option) any
* later version. This code comes with NO WARRANTY. Make backups!
*/
#ifndef QFS_H
#define QFS_H
typedef unsigned char byte;
extern "C" {
/*
* Compresses src and stores the output in dst.
* Returns the length of the compressed output if successful, otherwise returns 0.
*/
int qfs_compress(const byte* src, int srclen, byte* dst, int dstlen);
/*
* Decompresses src and stores the output in dst.
* Returns a boolean indicating if the decompression was successful.
*/
bool qfs_decompress(const byte* src, int srclen, byte* dst, int dstlen);
}
#endif