70,027
社区成员




unsigned long nzdata = 0;
unsigned char *temp;
temp = (unsigned char *)malloc(sizeof(char) * MAX_LEN);
memset(temp, 0, MAX_LEN);
int ret = 1;
ret = compress(temp, &nzdata, buf, MAX_LEN);
if(0 == ret)
{
printf("ok \n");
memset(buf, 0, MAX_LEN);
memcpy(buf, temp, nzdata);
free(temp);
printf("compress success\n");
}
else
{
// return -5: 输出缓冲区不够大
//return -4:没有足够的内存
free(temp);
printf("failed ret = %d \n", ret);
}