easy_decoder_memusage.c revision 207842
142807Smsmith/////////////////////////////////////////////////////////////////////////////// 260962Sdcs// 342807Smsmith/// \file easy_decoder_memusage.c 460962Sdcs/// \brief Decoder memory usage calculation to match easy encoder presets 542807Smsmith// 660962Sdcs// Author: Lasse Collin 760962Sdcs// 860962Sdcs// This file has been put into the public domain. 960962Sdcs// You can do whatever you want with this file. 1060962Sdcs// 1160962Sdcs/////////////////////////////////////////////////////////////////////////////// 1260962Sdcs 1351789Sdcs#include "easy_preset.h" 1442807Smsmith 1542807Smsmith 1642807Smsmithextern LZMA_API(uint64_t) 1742807Smsmithlzma_easy_decoder_memusage(uint32_t preset) 1842807Smsmith{ 1942807Smsmith lzma_options_easy opt_easy; 2042807Smsmith if (lzma_easy_preset(&opt_easy, preset)) 2142807Smsmith return UINT32_MAX; 2242807Smsmith 2342807Smsmith return lzma_raw_decoder_memusage(opt_easy.filters); 2442807Smsmith} 2542807Smsmith