|
ChaiLove API
2.0.0
|
Provides functionality for creating and transforming data. More...
Public Member Functions | |
| std::string | compress (const std::string &str, int level) |
| Compresses a string or data using a specific compression level. More... | |
| std::string | decompress (const std::string &str) |
| Decompresses a compressed string. More... | |
| std::string | encode (const std::string &containerType, const std::string &format, const std::string &sourceString) |
| Encode Data or a string to a Data or string in one of the EncodeFormats. More... | |
| std::string | decode (const std::string &containerType, const std::string &format, const std::string &sourceString) |
| Decode Data or a string to a Data or string in one of the EncodeFormats. More... | |
| std::string | hash (const std::string &hashFunction, const std::string &data) |
| Compute the message digest of specified string with specified algorithm. More... | |
Provides functionality for creating and transforming data.
| std::string love::data::compress | ( | const std::string & | str, |
| int | level | ||
| ) |
Compresses a string or data using a specific compression level.
| str | The raw (un-compressed) string to compress. |
| level | (-1) The level of compression to use, between 0 and 9. -1 indicates the default level. |
| std::string love::data::decode | ( | const std::string & | containerType, |
| const std::string & | format, | ||
| const std::string & | sourceString | ||
| ) |
Decode Data or a string to a Data or string in one of the EncodeFormats.
| containerType | What type to return the decoded data as. Only supports "string" currently. |
| format | The format of the input data. Can be "base64" or "hex". |
| sourceString | The raw (encoded) data to decode. |
| std::string love::data::decompress | ( | const std::string & | str | ) |
Decompresses a compressed string.
| str | A string containing data previously compressed with math.compress(). |
| std::string love::data::encode | ( | const std::string & | containerType, |
| const std::string & | format, | ||
| const std::string & | sourceString | ||
| ) |
Encode Data or a string to a Data or string in one of the EncodeFormats.
| containerType | What type to return the encoded data as. Only supports "string" currently. |
| format | The format of the output data. Can be "base64" or "hex". |
| sourceString | The raw data to encode. |
| std::string love::data::hash | ( | const std::string & | hashFunction, |
| const std::string & | data | ||
| ) |
Compute the message digest of specified string with specified algorithm.
| hashFunction | Hash algorithm to use (md5, sha1). |
| data | String to hash. |