Ada 2.9.2
Fast spec-compliant URL parser
Loading...
Searching...
No Matches
ada::serializers Namespace Reference

Includes the definitions for URL serializers. More...

Functions

void find_longest_sequence_of_ipv6_pieces (const std::array< uint16_t, 8 > &address, size_t &compress, size_t &compress_length) noexcept
 
std::string ipv6 (const std::array< uint16_t, 8 > &address) noexcept
 
std::string ipv4 (uint64_t address) noexcept
 

Detailed Description

Includes the definitions for URL serializers.

Function Documentation

◆ find_longest_sequence_of_ipv6_pieces()

void ada::serializers::find_longest_sequence_of_ipv6_pieces ( const std::array< uint16_t, 8 > & address,
size_t & compress,
size_t & compress_length )
noexcept

Finds and returns the longest sequence of 0 values in a ipv6 input.

Definition at line 8 of file serializers.cpp.

Referenced by ipv6().

◆ ipv4()

std::string ada::serializers::ipv4 ( uint64_t address)
noexcept

Serializes an ipv4 address.

An IPv4 address is a 32-bit unsigned integer that identifies a network address.

See also
https://url.spec.whatwg.org/#concept-ipv4-serializer

Definition at line 67 of file serializers.cpp.

◆ ipv6()

std::string ada::serializers::ipv6 ( const std::array< uint16_t, 8 > & address)
noexcept

Serializes an ipv6 address.

An IPv6 address is a 128-bit unsigned integer that identifies a network address.

See also
https://url.spec.whatwg.org/#concept-ipv6-serializer

Definition at line 26 of file serializers.cpp.

References find_longest_sequence_of_ipv6_pieces().