增加对GZIP压缩编码的解压缩功能及单元测试用例

This commit is contained in:
Lu Qiuwen
2018-09-26 21:31:17 +08:00
parent c7eeda0fb1
commit 8a4f02fbb8
6 changed files with 427 additions and 29 deletions

View File

@@ -0,0 +1,19 @@
#pragma once
#include <tfe_http.h>
#include <http_half.h>
struct hf_content_converter;
enum hf_content_conv_work_mode
{
HF_CONTENT_CONV_COMPRASS,
HF_CONTENT_CONV_UNCOMPRASS
};
int hf_content_converter_write(struct hf_content_converter * cv_object,
struct http_half_private * hf_private, tfe_http_event http_ev, const unsigned char * data, size_t datalen);
void hf_content_converter_destroy(struct hf_content_converter * cv_object);
struct hf_content_converter * hf_content_converter_create(enum hf_content_conv_work_mode mode,
unsigned int content_encode, hf_private_cb * data_cb, void * data_cb_user);