Address review and update zstd
This commit is contained in:
@@ -557,7 +557,7 @@ std::optional<std::string> GetCurrentDir() {
|
||||
#endif
|
||||
free(dir);
|
||||
return strDir;
|
||||
} // namespace FileUtil
|
||||
}
|
||||
|
||||
bool SetCurrentDir(const std::string& directory) {
|
||||
#ifdef _WIN32
|
||||
|
@@ -11,7 +11,7 @@
|
||||
namespace Common::Compression {
|
||||
|
||||
std::vector<u8> CompressDataZSTD(const u8* source, std::size_t source_size, s32 compression_level) {
|
||||
compression_level = std::clamp(compression_level, 1, ZSTD_maxCLevel());
|
||||
compression_level = std::clamp(compression_level, ZSTD_minCLevel(), ZSTD_maxCLevel());
|
||||
|
||||
const std::size_t max_compressed_size = ZSTD_compressBound(source_size);
|
||||
std::vector<u8> compressed(max_compressed_size);
|
||||
@@ -48,4 +48,4 @@ std::vector<u8> DecompressDataZSTD(const std::vector<u8>& compressed) {
|
||||
return decompressed;
|
||||
}
|
||||
|
||||
} // namespace Common::Compression
|
||||
} // namespace Common::Compression
|
||||
|
@@ -41,4 +41,4 @@ std::vector<u8> CompressDataZSTDDefault(const u8* source, std::size_t source_siz
|
||||
*/
|
||||
std::vector<u8> DecompressDataZSTD(const std::vector<u8>& compressed);
|
||||
|
||||
} // namespace Common::Compression
|
||||
} // namespace Common::Compression
|
||||
|
Reference in New Issue
Block a user