当前位置:网站首页>How to achieve efficient network information dissemination
How to achieve efficient network information dissemination
2022-06-23 07:11:00 【Strong learning】
The first point is from the perspective of generating information , That is, the amount of information should be small enough . for instance , from HTTP 1.1 Upgrade to HTTP2 after , stay HTTP 2 Chinese vs HTTP 1.1 Medium REST A large number of... Are transmitted repeatedly in the architecture HTTP header Field , I will use Huffman coding, which is a common compression algorithm . The essence of Huffman coding is to consider the concept of information entropy , Its core principle is to use shorter encoding for repeated words . such as HTTP 2 It's just 5 Bit to write an eight bit single byte number . For those who are very rare, use long codes . In terms of reducing the amount of information , In addition to using Huffman coding , You can also use static tables and dynamic tables .
Static tables are very common for content , For example, the request method is GET、 The response code is 200 And so on Header Information . Hard code them into the middleware code of the client server , For example, it appears i Express GET request , The presence of a number represents POST request . If hard coded into code , It can be well parsed . Static table volume is finite , The most effective method is dynamic table .
Before explaining the dynamic table , First, let's explain the relevance of the time dimension . For example, compress high-definition pictures , If you compress it tenfold , Basically, there is no distortion , But it has reached its limit . But if the HD video is compressed , It can be compressed to 100 Times to 1000 times , But it may not be obvious yet . This is due to the correlation in the time dimension . For example, video per second is 30 Frame or 60 frame , The changes between these frames and their corresponding pictures are very small . So as long as the first frame is designed as a key frame , So as to completely store this picture . The latter frame is only a change increment relative to the first frame , The amount of information in the second and subsequent frames is very small . therefore HTTP2 The dynamic table in is based on the same principle . The first time information is transmitted ,UA May be Chorme Or is it FireFox, But a page may contain hundreds of resources , It may even be repeated for hours , At this point, you can pair this at both ends UA Do dynamic coding , For example, encoding by integer numbers . All you need to do is transfer integer numbers .
边栏推荐
- C DPI adaptation problem
- [daily training] 513 Find the value in the lower left corner of the tree
- 【项目实训】线形箭头的变化
- Xxl-sso enables SSO single sign on
- 309. the best time to buy and sell stocks includes the freezing period
- C # how to obtain DPI and real resolution (can solve the problem that has been 96)
- About professional attitude
- Swagger3 integrates oauth2 authentication token
- 正则表达式图文超详细总结不用死记硬背(上篇)
- Add IPAD control function into shairplay
猜你喜欢

产品-Axure9(英文版),原型设计 制作下拉二级菜单
![[system] right click the desktop icon. After turning around, the Explorer will crash and the desktop will be refreshed](/img/aa/0189beb065fa0d4b625390793cb79b.png)
[system] right click the desktop icon. After turning around, the Explorer will crash and the desktop will be refreshed

MySQL mvcc multi version concurrency control

Configuration and compilation of mingw-w64, msys and ffmpeg

Run typescript code directly using TS node

407 stack and queue (232. implementing queue with stack, 225. implementing stack with queue)

406 double pointer (27. remove elements, 977. square of ordered array, 15. sum of three numbers, 18. sum of four numbers)

406-双指针(27. 移除元素、977.有序数组的平方、15. 三数之和、18. 四数之和)

产品-Axure9(英文版),原型设计后台动态二级菜单显示内容

MySQL Redo log Redo log
随机推荐
MySQL basic query
关于#sql#的问题:有没有不增加字段,在原有字段的基础上,对字段里面的null值进行填充的方法呢
Storage mode of data in memory (C language)
315. calculate the number of elements on the right that are smaller than the current element
899. 有序队列
896. monotonic sequence
excel高级绘图技巧100讲(八)-Excel绘制WIFI图
The List
Why does TCP protocol shake hands three times instead of two?
307. 区域和检索 - 数组可修改
MySQL index
技术文章写作指南
MySQL function
junit单元测试报错org.junit.runners.model.InvalidTestClassError: Invalid test class ‘xxx‘ .No runnable meth
Concepts and differences of DQL, DML, DDL and DCL
System permission program cannot access SD card
图解三次握手四次挥手,小白都能看懂
Summarized benefits
Verilog syntax explanation
deeplab v3 代码结构图