File Information
Library: FastInfoset
Package: FastInfoset
Header: Poco/FastInfoset/EncodingAlgorithm.h
Description
Groups together different encoding algorithms as defined by the FastInfoset standard.
Member Summary
Member Functions: add, canEncode, encode, findEncoding
Enumerations
Algorithm
INVALID = 0
HEX_ENCODING = 1
DWORD_ENCODING = 2
SHORT_ENCODING = 3
INT_ENCODING = 4
LONG_ENCODING = 5
BOOL_ENCODING = 6
FLOAT_ENCODING = 7
DOUBLE_ENCODING = 8
UUID_ENCODING = 9
CDATA_ENCODING = 10
RESERVED = 11
LAST_RESERVED = 31
USER_DEFINED = 32
LAST_USER_DEFINED = 256
Constructors
EncodingAlgorithm
Destructor
~EncodingAlgorithm
Member Functions
add
void add(
Encoding::EncodeMethod em,
Encoding::CheckMethod ec
);
Adds the given encoding.
canEncode
Poco::Int32 canEncode(
Poco::UInt32 idx,
const std::string & data
) const;
Returns the size of the compressed content (excl header) if it can encode sth, otherwise a value <= 0 is returned.
encode
void encode(
Poco::UInt32 idx,
BitStreamWriter & aWriter,
const std::string & data
);
Encodes data directly to the bitstream. idx specifies the algorithm used.
findEncoding
Poco::UInt32 findEncoding(
const std::string & data
) const;
Finds an encoding that can encode the data, returns INVALID if none is found.