Network System 0.1.1
High-performance modular networking library for scalable client-server applications
Loading...
Searching...
No Matches
kcenon::network::protocols::http2::huffman Namespace Reference

Functions

auto encode (std::string_view input) -> std::vector< uint8_t >
 Encode string using Huffman coding.
 
auto decode (std::span< const uint8_t > data) -> Result< std::string >
 Decode Huffman encoded string.
 
auto encoded_size (std::string_view input) -> size_t
 Get encoded size for string.
 

Function Documentation

◆ decode()

auto kcenon::network::protocols::http2::huffman::decode ( std::span< const uint8_t > data) -> Result<std::string>

Decode Huffman encoded string.

Parameters
dataEncoded bytes
Returns
Decoded string or error

Definition at line 660 of file hpack.cpp.

661 {
662 // Stub: just return the data as-is
663 return std::string(data.begin(), data.end());
664 }

References kcenon::network::protocols::http2::data.

◆ encode()

auto kcenon::network::protocols::http2::huffman::encode ( std::string_view input) -> std::vector<uint8_t>

Encode string using Huffman coding.

Parameters
inputString to encode
Returns
Encoded bytes

Definition at line 654 of file hpack.cpp.

655 {
656 // Stub: just return the input as-is
657 return std::vector<uint8_t>(input.begin(), input.end());
658 }

◆ encoded_size()

auto kcenon::network::protocols::http2::huffman::encoded_size ( std::string_view input) -> size_t

Get encoded size for string.

Parameters
inputString to measure
Returns
Size in bytes if Huffman encoded

Definition at line 666 of file hpack.cpp.

667 {
668 // Stub: return input size
669 return input.size();
670 }