提交 a42e2897 编写于 作者: 云逸之's avatar 云逸之 💬

添加自述文件

上级 06b46cbf
使用gzip压缩html,并生成字节码数组。
生成结果样例如下
```cpp
#define index_html_len 4314
const uint8_t index_html_gz[] = {
0x1F, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xE5, 0x5D, 0xEB, 0x92, 0xD3, 0x46,
0x16, 0xFE, 0xCF, 0x53, 0x08, 0x41, 0x18, 0xBB, 0x32, 0xF6, 0xD8, 0x1E, 0x33, 0x0C, 0x8E, 0x2D,
....
};
```
用于mcu节省空间
以下使用 `esp_http_server.h`。设置http响应头`Content-Encoding` 中压缩格式,让浏览器按gzip格式解压
```cpp
httpd_resp_set_type(req, "text/html");
httpd_resp_set_hdr(req, "Content-Encoding", "gzip");
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册