Changeset View
Changeset View
Standalone View
Standalone View
head/sys/opencrypto/cryptodeflate.c
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
/* | /* | ||||
* This function takes a block of data and (de)compress it using the deflate | * This function takes a block of data and (de)compress it using the deflate | ||||
* algorithm | * algorithm | ||||
*/ | */ | ||||
uint32_t | uint32_t | ||||
deflate_global(data, size, decomp, out) | deflate_global(uint8_t *data, uint32_t size, int decomp, uint8_t **out) | ||||
uint8_t *data; | |||||
uint32_t size; | |||||
int decomp; | |||||
uint8_t **out; | |||||
{ | { | ||||
/* decomp indicates whether we compress (0) or decompress (1) */ | /* decomp indicates whether we compress (0) or decompress (1) */ | ||||
z_stream zbuf; | z_stream zbuf; | ||||
uint8_t *output; | uint8_t *output; | ||||
uint32_t count, result; | uint32_t count, result; | ||||
int error, i; | int error, i; | ||||
struct deflate_buf *bufh, *bufp; | struct deflate_buf *bufh, *bufp; | ||||
▲ Show 20 Lines • Show All 147 Lines • Show Last 20 Lines |