Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kelbon authored Oct 17, 2024
1 parent fa13197 commit b586193
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Complete implementation of HPACK (Header Compression for HTTP/2, fully compliant
encode:

```cpp
#include <hpack/encoder.hpp>
#include <hpack/hpack.hpp>

void encode_my_headers(hpack::encoder& enc, std::vector<hpack::bytes>& bytes;) {
// memory effective by default
Expand All @@ -18,7 +18,7 @@ void encode_my_headers(hpack::encoder& enc, std::vector<hpack::bytes>& bytes;) {
decode
```cpp
#include <hpack/decoder.hpp>
#include <hpack/hpack.hpp>
void decode_my_headers(hpack::decoder& d, std::span<const hpack::byte_t> bytes) {
hpack::decode_headers_block(e, bytes, [&](std::string_view name, std::string_view value) {
Expand All @@ -37,7 +37,8 @@ Preferred way with [CPM](https://github.com/cpm-cmake/CPM.cmake)
CPMAddPackage(
NAME HPACK
GIT_REPOSITORY https://github.com/kelbon/HPACK
GIT_TAG origin/master
GIT_TAG v1.0.0
OPTIONS "HPACK_ENABLE_TESTING ON"
)
target_link_libraries(MyTargetName hpacklib)
Expand Down

0 comments on commit b586193

Please sign in to comment.