/* * This file is part of the Flowee project * Copyright (C) 2016,2018-2025 Tom Zander * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef StreamingUtils_H #define StreamingUtils_H #include #include #include namespace Streaming { int writeCompactSize(char *data, uint64_t value); /// return the compact size int from a bytearray. /// Fails on there not being enough bytes available by simply /// returning zero and setting the data pointer to match \a end. uint64_t readCompactSize(const char **data, const char *end); std::string bytesToHex(const std::vector &bytes); } #endif