Function opensw::inflate
Defined in File protocol.h
Function Documentation
-
std::vector<uint8_t> opensw::inflate(const std::string &base64_data)
Inflate encoded binary data.
First the data is decoded from a base64 string and then it is processed to decode from run length encoding.
A 9 byte buffer in the decoded base64 data is assumed, which should contain the specifics of the run length encoding:
[0] ‘R’ [1] ‘L’ [2] ‘E’ [3] sentinel byte 1 (usually 129) [4] sentinel byte 2 (usually 127) [5 - 8] length of inflated data (uint32)
- Parameters
base64_data – [in] The base64 encoded data string.
- Returns
The inflated data if successful, empty otherwise.