* \return Rough number of bytes required for the given filter chain
* when encoding.
*/
-extern uint64_t lzma_memusage_encoder(const lzma_filter *filters)
+extern uint64_t lzma_raw_encoder_memusage(const lzma_filter *filters)
lzma_attr_pure;
* \return Rough number of bytes required for the given filter chain
* when decoding.
*/
-extern uint64_t lzma_memusage_decoder(const lzma_filter *filters)
+extern uint64_t lzma_raw_decoder_memusage(const lzma_filter *filters)
lzma_attr_pure;
if (easy_set_filters(&coder, preset))
return UINT32_MAX;
- return lzma_memusage_encoder(coder.filters);
+ return lzma_raw_encoder_memusage(coder.filters);
}
if (easy_set_filters(&coder, preset))
return UINT32_MAX;
- return lzma_memusage_decoder(coder.filters);
+ return lzma_raw_decoder_memusage(coder.filters);
}
extern uint64_t
-lzma_memusage_coder(lzma_filter_find coder_find,
+lzma_raw_coder_memusage(lzma_filter_find coder_find,
const lzma_filter *filters)
{
// The chain has to have at least one filter.
lzma_filter_find coder_find, bool is_encoder);
-extern uint64_t lzma_memusage_coder(lzma_filter_find coder_find,
+extern uint64_t lzma_raw_coder_memusage(lzma_filter_find coder_find,
const lzma_filter *filters);
extern LZMA_API uint64_t
-lzma_memusage_decoder(const lzma_filter *filters)
+lzma_raw_decoder_memusage(const lzma_filter *filters)
{
- return lzma_memusage_coder(
+ return lzma_raw_coder_memusage(
(lzma_filter_find)(&decoder_find), filters);
}
extern LZMA_API uint64_t
-lzma_memusage_encoder(const lzma_filter *filters)
+lzma_raw_encoder_memusage(const lzma_filter *filters)
{
- return lzma_memusage_coder(
+ return lzma_raw_coder_memusage(
(lzma_filter_find)(&encoder_find), filters);
}
allocator, coder->buffer));
// Check the memory usage limit.
- const uint64_t memusage = lzma_memusage_decoder(filters);
+ const uint64_t memusage = lzma_raw_decoder_memusage(filters);
lzma_ret ret;
if (memusage == UINT64_MAX) {
uint64_t memory_usage;
uint64_t memory_limit;
if (opt_mode == MODE_COMPRESS) {
- memory_usage = lzma_memusage_encoder(filters);
+ memory_usage = lzma_raw_encoder_memusage(filters);
memory_limit = hardware_memlimit_encoder();
} else {
- memory_usage = lzma_memusage_decoder(filters);
+ memory_usage = lzma_raw_decoder_memusage(filters);
memory_limit = hardware_memlimit_decoder();
}
if (opt->dict_size < (UINT32_C(1) << 20))
memlimit_too_small(memory_usage, memory_limit);
- memory_usage = lzma_memusage_encoder(filters);
+ memory_usage = lzma_raw_encoder_memusage(filters);
if (memory_usage == UINT64_MAX)
message_bug();