Files
openpilot-evo/selfdrive/ui/replay/util.h
T
Dean Lee 84481c134b replay/logreader: handle abort in load (#23321)
* handle abort

* handle abort in decompressBZ2
old-commit-hash: 937a0df57bd0469af49b7bb4f44ca5ea3c4ae881
2022-01-04 12:06:23 +01:00

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);