morpheus_network::transfer

Module chunked

Source
Expand description

Chunked transfer encoding decoder.

Decodes HTTP chunked transfer encoding as defined in RFC 7230.

§Format

chunk-size (hex)\r\n
chunk-data\r\n
...
0\r\n
\r\n

§Examples

use morpheus_network::transfer::ChunkedDecoder;

let data = b"5\r\nHello\r\n0\r\n\r\n";
let result = ChunkedDecoder::decode(data).unwrap();
assert_eq!(result, b"Hello");

Structs§

Enums§