easy_decoder_memusage.c revision 207753
1178476Sjb/////////////////////////////////////////////////////////////////////////////// 2178476Sjb// 3178476Sjb/// \file easy_decoder_memusage.c 4178476Sjb/// \brief Decoder memory usage calculation to match easy encoder presets 5178476Sjb// 6178476Sjb// Author: Lasse Collin 7178476Sjb// 8178476Sjb// This file has been put into the public domain. 9178476Sjb// You can do whatever you want with this file. 10178476Sjb// 11178476Sjb/////////////////////////////////////////////////////////////////////////////// 12178476Sjb 13178476Sjb#include "easy_preset.h" 14178476Sjb 15178476Sjb 16178476Sjbextern LZMA_API(uint64_t) 17178476Sjblzma_easy_decoder_memusage(uint32_t preset) 18178476Sjb{ 19178476Sjb lzma_options_easy opt_easy; 20178476Sjb if (lzma_easy_preset(&opt_easy, preset)) 21178476Sjb return UINT32_MAX; 22178476Sjb 23178476Sjb return lzma_raw_decoder_memusage(opt_easy.filters); 24178476Sjb} 25178476Sjb