Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Kitware
GitHub Repository: Kitware/CMake
Path: blob/master/Utilities/cmliblzma/liblzma/common/easy_decoder_memusage.c
3153 views
1
// SPDX-License-Identifier: 0BSD
2
3
///////////////////////////////////////////////////////////////////////////////
4
//
5
/// \file easy_decoder_memusage.c
6
/// \brief Decoder memory usage calculation to match easy encoder presets
7
//
8
// Author: Lasse Collin
9
//
10
///////////////////////////////////////////////////////////////////////////////
11
12
#include "easy_preset.h"
13
14
15
extern LZMA_API(uint64_t)
16
lzma_easy_decoder_memusage(uint32_t preset)
17
{
18
lzma_options_easy opt_easy;
19
if (lzma_easy_preset(&opt_easy, preset))
20
return UINT32_MAX;
21
22
return lzma_raw_decoder_memusage(opt_easy.filters);
23
}
24
25