forked from ntddk/temu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TEMU_vm_compress.h
32 lines (26 loc) · 1.04 KB
/
TEMU_vm_compress.h
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
/*
TEMU is Copyright (C) 2006-2009, BitBlaze Team.
TEMU is based on QEMU, a whole-system emulator. You can redistribute
and modify it under the terms of the GNU LGPL, version 2.1 or later,
but it is made available WITHOUT ANY WARRANTY. See the top-level
README file for more details.
For more information about TEMU and other BitBlaze software, see our
web site at: http://bitblaze.cs.berkeley.edu/
*/
#ifndef _TEMU_VM_COMPRESS_H_
#define _TEMU_VM_COMPRESS_H_
#include <zlib.h>
#define IOBUF_SIZE 4096
typedef struct{
z_stream zstream;
void *f;
uint8_t buf[IOBUF_SIZE];
} TEMU_CompressState_t;
int TEMU_compress_open(TEMU_CompressState_t *s, void *f);
int TEMU_compress_buf(TEMU_CompressState_t *s, const uint8_t *buf, int len);
void TEMU_compress_close(TEMU_CompressState_t *s);
int TEMU_decompress_open(TEMU_CompressState_t *s, void *f);
int TEMU_decompress_buf(TEMU_CompressState_t *s, uint8_t *buf, int len);
void TEMU_decompress_close(TEMU_CompressState_t *s);
void TEMU_vm_compress_init(void); //dummy init
#endif //_TEMU_VM_COMPRESS_H_