mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-09-10 02:03:42 +08:00
84481c134b
* handle abort * handle abort in decompressBZ2 old-commit-hash: 937a0df57bd0469af49b7bb4f44ca5ea3c4ae881
15 lines
695 B
C++
15 lines
695 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::atomic<bool> *abort = nullptr);
|
|
std::string decompressBZ2(const std::byte *in, size_t in_size, std::atomic<bool> *abort = nullptr);
|
|
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);
|