1 Star 0 Fork 0

setoutsoft / ls-qpack

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Build Status Build status Build Status

ls-qpack

QPACK compression library for use with HTTP/3

Introduction

QPACK is the compression mechanism used by HTTP/3 to compress HTTP headers. It is in the process of being standardazed by the QUIC Working Group. The QPACK Internet-Draft is has been stable for some time and we don't expect functional changes to it before the final RFC is released.

Functionality

ls-qpack is a full-featured, tested, and fast QPACK library. The QPACK encoder produces excellent compression results based on an innovative mnemonic technique (to be described in a future article). It boasts the fastest Huffman encoder and decoder.

The library is production quality. It is used in OpenLiteSpeed, LiteSpeed Web Server, and LiteSpeed Web ADC.

The library is robust:

  1. The encoder does not assume anything about usual HTTP headers such as Server or User-Agent. Instead, it uses its mnemonic compression technique to achieve good compression results for any input.
  2. The decoder uses modulo arithmetic to track dynamic table insertions. This is in contrast to all other QPACK implementations, which use an integer counter, meaning that at some point, the decoder will break.
  3. The decoder processes input in streaming fashion. The caller does not have to buffer the contents of HTTP/3 HEADERS frame. Instead, the decoder can be supplied input byte-by-byte.

Other Languages

The ls-qpack library is implemented in vanilla C99. It makes it a good candidate for wrapping into a library for a higher-level language. As of this writing, we know of the following wrappers:

Versioning

Before the QPACK RFC is released, the three parts of the version are:

  • MAJOR: set to zero;
  • MINOR: set to the number of QPACK Internet-Draft the lirbary supports; and
  • PATCH: set to the patch number

Once the RFC is released, MARJO will be set to 1 and the version will follow the usual MAJOR.MINOR.PATCH pattern.

API

The API is documented in the header file, lsqpack.h. One example how it is used in real code can be seen in lsquic, a QUIC and HTTP/3 library developed by LiteSpeed Technologies.

MIT License Copyright (c) 2018 - 2020 LiteSpeed Tech Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/setoutsoft/ls-qpack.git
git@gitee.com:setoutsoft/ls-qpack.git
setoutsoft
ls-qpack
ls-qpack
master

搜索帮助