create const for COMPRESSION_PRESET

This commit is contained in:
Bence Pőcze 2022-02-21 08:39:52 +01:00
parent 0e73ecb514
commit 8c86b4cc62
Signed by: bence
GPG Key ID: 0520C81918569406

View File

@ -15,13 +15,14 @@ extern "C"
#include <lzma.h> #include <lzma.h>
} }
const uint32_t COMPRESSION_PRESET = 9 | LZMA_PRESET_EXTREME;
const std::vector<std::string> ENDINGS = {".mf4", ".rif"}; const std::vector<std::string> ENDINGS = {".mf4", ".rif"};
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
const std::filesystem::path directory = argc > 1 ? argv[1] : std::filesystem::current_path(); const std::filesystem::path directory = argc > 1 ? argv[1] : std::filesystem::current_path();
lzma_stream strm = LZMA_STREAM_INIT; lzma_stream strm = LZMA_STREAM_INIT;
bool success = lzma_init_encoder(&strm, 9 | LZMA_PRESET_EXTREME); bool success = lzma_init_encoder(&strm, COMPRESSION_PRESET);
if (success) if (success)
{ {