1
shuax 2016-08-25 20:51:43 +08:00
怎么能提高性能,应该是节约流量吧。
|
2
wql OP @shuax 参考了谷歌官方的描述:It is similar in speed with deflate but offers more dense compression.
的确是在保持了速度的同时节约流量。 |
3
shyling 2016-08-25 21:07:40 +08:00
话说这样设置的话在浏览器没有发 accept-encoding:br 时也会用 brotli 压缩么
|
4
ivmm 2016-08-25 21:13:22 +08:00
提高性能的原理是什么?
|
5
knightdf 2016-08-25 21:16:20 +08:00
既然是要提高性能,那我不压缩不是性能最高?
|
6
lhbc 2016-08-25 21:16:49 +08:00
能和 gzip 共存吗?
如果不支持共存,不支持 brotli 的浏览器是不是不能使用任何压缩? |
9
qgy18 2016-08-26 00:13:07 +08:00 via iPhone
👍 我的博客前几天已经用上了。
这个算法主要是内置了分析大量网页之后提取的字典,所以能在压缩比更高的同时不影响解压速度。 |
10
chinaiy 2016-11-24 09:50:34 +08:00
@qgy18 看你博客配置完整篇一步一步操作,编译和安装 Nginx 这一步: make ,出现下面的错误,昨天研究到现在都不知道怎么解决,求助,谢谢
cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../openssl/.openssl/include -I objs -I src/http -I src/http/modules -I src/http/v2 \ -o objs/addon/src/ngx_http_brotli_filter_module.o \ ../ngx_brotli/src/ngx_http_brotli_filter_module.c ../ngx_brotli/src/ngx_http_brotli_filter_module.c: In function ‘ ngx_http_brotli_body_filter ’: ../ngx_brotli/src/ngx_http_brotli_filter_module.c:272:9: error: ‘ BrotliEncoderInputBlockSize ’ is deprecated (declared at /usr/local/include/brotli/encode.h:87) [-Werror=deprecated-declarations] ctx->brotli_ring = BrotliEncoderInputBlockSize(ctx->encoder); ^ ../ngx_brotli/src/ngx_http_brotli_filter_module.c: In function ‘ ngx_http_brotli_filter_add_data ’: ../ngx_brotli/src/ngx_http_brotli_filter_module.c:498:5: error: ‘ BrotliEncoderCopyInputToRingBuffer ’ is deprecated (declared at /usr/local/include/brotli/encode.h:95) [-Werror=deprecated-declarations] BrotliEncoderCopyInputToRingBuffer(ctx->encoder, size, b->pos); ^ ../ngx_brotli/src/ngx_http_brotli_filter_module.c: In function ‘ ngx_http_brotli_filter_process ’: ../ngx_brotli/src/ngx_http_brotli_filter_module.c:534:5: error: ‘ BrotliEncoderWriteData ’ is deprecated (declared at /usr/local/include/brotli/encode.h:109) [-Werror=deprecated-declarations] if (!BrotliEncoderWriteData(ctx->encoder, ctx->last, ctx->flush, &size, ^ cc1: all warnings being treated as errors make[1]: *** [objs/addon/src/ngx_http_brotli_filter_module.o] Error 1 make[1]: Leaving directory `/root/nginx-1.11.5' make: *** [build] Error 2 |
11
qgy18 2016-11-24 17:05:43 +08:00 via iPhone
|
12
wql OP @chinaiy 上周更新过文章了,建议增加编译选项 --with-cc-opt=-Wno-deprecated-declarations
|
15
chinaiy 2016-12-12 12:22:46 +08:00
@wql 部署了一台阿里云新机器,编译 nginx 的时候报错,之前都成功,现在不知道是什么缘故, 求助~
./configure: error: Brotli library is missing from the ../ngx_brotli/deps/brotli directory. Please make sure that the git submodule has been checked out: cd ../ngx_brotli && git submodule update --init && cd /root/nginx-1.11.5 |
16
wql OP |