gendx / lzma-rs

An LZMA decoder written in pure Rust
MIT License
127 stars 27 forks source link

add `xz_decompress_with_options` API #110

Open jtmoon79 opened 6 months ago

jtmoon79 commented 6 months ago

Problem

xz_decompress reads the entire .xz file in one call. The entire file is stored in memory. Decompressing large files can lead to Out Of Memory errors.

Solution

Provide xz_decompress_with_options, similar to other _with_options API functions. Notably, this would allow passing an Options with a set memlimit. Then the user need not store the entire file in memory.

Similar to #49