Motion Master
|
#include "util.h"
#include <loguru.h>
#include <zip/zip.h>
#include <iomanip>
#include <sstream>
#include <unordered_map>
#include <unordered_set>
Namespaces | |
namespace | mm |
namespace | mm::core |
namespace | mm::core::util |
Functions | |
std::vector< std::vector< uint8_t > > | mm::core::util::splitIntoParts (const std::vector< uint8_t > &input, size_t partSize) |
Splits a byte vector into parts of a specified maximum size. More... | |
std::vector< uint8_t > | mm::core::util::zipData (const std::string &filename, const std::vector< uint8_t > &data) |
Compresses a block of data into a ZIP archive containing a single file. More... | |
std::unordered_map< std::string, std::vector< uint8_t > > | mm::core::util::unzipData (const std::vector< uint8_t > &data) |
Unzips a ZIP archive from an in-memory byte buffer. More... | |
std::vector< uint8_t > | mm::core::util::readBinaryFile (const std::string &filename) |
Reads the entire contents of a binary file into a byte vector. More... | |
std::string | mm::core::util::readTextFile (const std::string &filename) |
Reads the entire content of a text file into a std::string. More... | |
std::string | mm::core::util::joinStrings (const std::vector< std::string > &list, const std::string &delimiter) |
Joins a list of strings into a single string with a delimiter. More... | |
std::string | mm::core::util::formatMacAddress (const std::string &originalMacAddress) |
Formats a MAC address string to ensure each component is two digits and uppercase. More... | |
std::string | mm::core::util::extractIpAddress (const std::string &socketAddress) |
Extracts the IP address from a socket address string. More... | |
unsigned short | mm::core::util::extractPort (const std::string &socketAddress) |
Extracts the port number from a socket address string. More... | |