aboutsummaryrefslogtreecommitdiff
path: root/src/lzma/hardware.h
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2008-11-19 20:46:52 +0200
committerLasse Collin <lasse.collin@tukaani.org>2008-11-19 20:46:52 +0200
commite114502b2bc371e4a45449832cb69be036360722 (patch)
tree449c41d0408f99926de202611091747f1fbe2f85 /src/lzma/hardware.h
parentFixed the test that should have been fixed as part (diff)
downloadxz-e114502b2bc371e4a45449832cb69be036360722.tar.xz
Oh well, big messy commit again. Some highlights:
- Updated to the latest, probably final file format version. - Command line tool reworked to not use threads anymore. Threading will probably go into liblzma anyway. - Memory usage limit is now about 30 % for uncompression and about 90 % for compression. - Progress indicator with --verbose - Simplified --help and full --long-help - Upgraded to the last LGPLv2.1+ getopt_long from gnulib. - Some bug fixes
Diffstat (limited to '')
-rw-r--r--src/lzma/hardware.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lzma/hardware.h b/src/lzma/hardware.h
index d47bd29f..f604df20 100644
--- a/src/lzma/hardware.h
+++ b/src/lzma/hardware.h
@@ -24,8 +24,22 @@
extern size_t opt_threads;
-extern size_t opt_memory;
+
+/// Initialize some hardware-specific variables, which are needed by other
+/// hardware_* functions.
extern void hardware_init(void);
+
+/// Set custom memory usage limit. This is used for both encoding and
+/// decoding. Zero indicates resetting the limit back to defaults.
+extern void hardware_memlimit_set(uint64_t memlimit);
+
+/// Get the memory usage limit for encoding. By default this is 90 % of RAM.
+extern uint64_t hardware_memlimit_encoder(void);
+
+
+/// Get the memory usage limit for decoding. By default this is 30 % of RAM.
+extern uint64_t hardware_memlimit_decoder(void);
+
#endif