mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-19 20:33:54 +08:00
* catch exception outside loop * print decompress error * add test case for corrupt log * fix decompressbz2 stuck if log is corrupt * recovered from corrupt data * add output * ass space * std::endl * override load(), load from buffer * override FrameReader::load to load from the buffer * replace NULL with nullptr * fix test case for corrupt log * Trigger Build * check bzerror too Co-authored-by: Willem Melching <willem.melching@gmail.com>
15 lines
623 B
C++
15 lines
623 B
C++
#pragma once
|
|
|
|
#include <atomic>
|
|
#include <string>
|
|
|
|
std::string sha256(const std::string &str);
|
|
void precise_nano_sleep(long sleep_ns);
|
|
std::string decompressBZ2(const std::string &in);
|
|
std::string decompressBZ2(const std::byte *in, size_t in_size);
|
|
void enableHttpLogging(bool enable);
|
|
std::string getUrlWithoutQuery(const std::string &url);
|
|
size_t getRemoteFileSize(const std::string &url);
|
|
std::string httpGet(const std::string &url, size_t chunk_size = 0, std::atomic<bool> *abort = nullptr);
|
|
bool httpDownload(const std::string &url, const std::string &file, size_t chunk_size = 0, std::atomic<bool> *abort = nullptr);
|