aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/api (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-11-01Bump version and soname for 5.4.5.larhzu/v5.4.5Jia Tan1-1/+1
2023-10-31liblzma: Refer to MinGW-w64 instead of MinGW in the API headers.Lasse Collin2-3/+3
MinGW (formely a MinGW.org Project, later the MinGW.OSDN Project at <https://osdn.net/projects/mingw/>) has GCC 9.2.0 as the most recent GCC package (released 2021-02-02). The project might still be alive but majority of people have switched to MinGW-w64. Thus it seems clearer to refer to MinGW-w64 in our API headers too. Building with MinGW is likely to still work but I haven't tested it in the recent years.
2023-08-02Bump version and soname for 5.4.4.larhzu/v5.4.4Jia Tan1-1/+1
2023-08-01Docs: Fix typos found by codespellDimitri Papadopoulos Orfanos3-5/+5
2023-07-18liblzma: Reword lzma_str_list_filters() documentation.Jia Tan1-1/+1
Reword "options required" to "options read". The previous wording may have suggested that the options listed were all required when the filters are used for encoding or decoding. Now it should be more clear that the options listed are the ones relevant for encoding or decoding.
2023-07-18liblzma: Adds lzma_nothrow to MicroLZMA API functions.Jia Tan1-2/+3
None of the liblzma functions may throw an exception, so this attribute should be applied to all liblzma API functions.
2023-05-04Bump version and soname for 5.4.3.Jia Tan1-1/+1
2023-04-25liblzma: Update project maintainers in lzma.h.Lasse Collin1-1/+1
AUTHORS was updated earlier, lzma.h was simply forgotten.
2023-03-18Bump version and soname for 5.4.2.larhzu/v5.4.2Jia Tan1-1/+1
2023-03-18Change a few HTTP URLs to HTTPS.Lasse Collin1-4/+4
The xz man page timestamp was intentionally left unchanged.
2023-03-17liblzma: Remove note from lzma_options_bcj about the ARM64 exception.Jia Tan1-1/+1
This was left in by mistake since an early version of the ARM64 filter used a different struct for its options.
2023-03-17liblzma: Add set lzma.h as the main page for Doxygen documentation.Jia Tan15-29/+2
The \mainpage command is used in the first block of comments in lzma.h. This changes the previously nearly empty index.html to use the first comment block in lzma.h for its contents. lzma.h is no longer documented separately, but this is for the better since lzma.h only defined a few macros that users do not need to use. The individual API header files all have a disclaimer that they should not be #included directly, so there should be no confusion on the fact that lzma.h should be the only header used by applications. Additionally, the note "See ../lzma.h for information about liblzma as a whole." was removed since lzma.h is now the main page of the generated HTML and does not have its own page anymore. So it would be confusing in the HTML version and was only a "nice to have" when browsing the source files.
2023-03-07liblzma: Improve documentation for version.h.Jia Tan1-7/+22
Specified parameter and return values for API functions and documented a few more of the macros.
2023-03-07liblzma: Clarify lzma_lzma_preset() documentation in lzma12.h.Jia Tan1-0/+5
lzma_lzma_preset() does not guarentee that the lzma_options_lzma are usable in an encoder even if it returns false (success). If liblzma is built with default configurations, then the options will always be usable. However if the match finders hc3, hc4, or bt4 are disabled, then the options may not be usable depending on the preset level requested. The documentation was updated to reflect this complexity, since this behavior was unclear before.
2023-03-07liblzma: Replace '\n' -> newline in filter.h documentation.Jia Tan1-1/+1
The '\n' renders as a newline when the comments are converted to html by Doxygen.
2023-03-07liblzma: Shorten return description for two functions in filter.h.Jia Tan1-6/+2
Shorten the description for lzma_raw_encoder_memusage() and lzma_raw_decoder_memusage().
2023-03-07liblzma: Reword a few lines in filter.hJia Tan1-5/+5
2023-03-07liblzma: Improve documentation in filter.h.Jia Tan1-83/+143
All functions now explicitly specify parameter and return values. The notes and code annotations were moved before the parameter and return value descriptions for consistency. Also, the description above lzma_filter_encoder_is_supported() about not being able to list available filters was removed since lzma_str_list_filters() will do this.
2023-03-07liblzma: Adjust container.h for consistency with filter.h.Jia Tan1-11/+9
2023-03-07liblzma: Fix small typos and reword a few things in filter.h.Jia Tan1-7/+6
2023-03-07liblzma: Convert list of flags in lzma_mt to bulleted list.Jia Tan1-3/+6
2023-03-07liblzma: Fix typo in documentation in container.hJia Tan1-1/+1
lzma_microlzma_decoder -> lzma_microlzma_encoder
2023-03-07liblzma: Improve documentation for container.hJia Tan1-53/+93
Standardizing each function to always specify parameters and return values. Also moved the parameters and return values to the end of each function description.
2023-03-07liblzma: Very minor API doc tweaks.Lasse Collin4-14/+14
Use "member" to refer to struct members as that's the term used by the C standard. Use lzma_options_delta.dist and such in docs so that in Doxygen's HTML output they will link to the doc of the struct member. Clean up a few trailing white spaces too.
2023-03-07liblzma: Adjust spacing in doc headers in bcj.h.Jia Tan1-7/+7
2023-03-07liblzma: Adjust documentation in bcj.h for consistent style.Jia Tan1-21/+22
2023-03-07liblzma: Rename field => member in documentation.Jia Tan7-95/+95
Also adjusted preset value => preset level.
2023-03-07liblzma: Improve documentation for stream_flags.hJia Tan1-30/+46
Standardizing each function to always specify parameters and return values. Also moved the parameters and return values to the end of each function description. A few small things were reworded and long sentences broken up.
2023-02-15liblzma: Improve documentation in lzma12.h.Jia Tan1-9/+23
All functions now explicitly specify parameter and return values.
2023-02-15liblzma: Improve documentation in check.h.Jia Tan1-13/+28
All functions now explicitly specify parameter and return values. Also moved the note about SHA-256 functions not being exported to the top of the file.
2023-02-15liblzma: Improve documentation in index.hJia Tan1-51/+126
All functions now explicitly specify parameter and return values.
2023-02-15liblzma: Reword a comment in index.h.Jia Tan1-2/+2
2023-02-15liblzma: Omit lzma_index_iter's internal field from Doxygen docs.Jia Tan1-1/+8
Add \private above this field and its sub-fields since it is not meant to be modified by users.
2023-02-15liblzma: Fix documentation for LZMA_MEMLIMIT_ERROR.Jia Tan1-1/+1
LZMA_MEMLIMIT_ERROR was missing the "<" character needed to put documentation after a member.
2023-02-15liblzma: Improve documentation for base.h.Jia Tan1-5/+25
Standardizing each function to always specify params and return values. Also fixed a small grammar mistake.
2023-02-15liblzma: Minor improvements to vli.h.Jia Tan1-7/+8
Added [out] annotations to parameters that are pointers and can have their value changed. Also added a clarification to lzma_vli_is_valid.
2023-02-15liblzma: Add comments for macros in delta.h.Jia Tan1-0/+8
Document LZMA_DELTA_DIST_MIN and LZMA_DELTA_DIST_MAX for completeness and to avoid Doxygen warnings.
2023-02-15liblzma: Improve documentation in index_hash.h.Jia Tan1-9/+27
All functions now explicitly specify parameter and return values. Also reworded the description of lzma_index_hash_init() for readability.
2023-02-03liblzma: Clarify block encoder and decoder documentation.Jia Tan1-4/+11
Added a few sentences to the description for lzma_block_encoder() and lzma_block_decoder() to highlight that the Block Header must be coded before calling these functions.
2023-02-03Update lzma_block documentation for lzma_block_uncomp_encode().Jia Tan1-0/+3
2023-02-03liblzma: Minor edits to lzma_block header_size documentation.Jia Tan1-1/+2
2023-02-03liblzma: Enumerate functions that read version in lzma_block.Jia Tan1-2/+11
2023-02-03liblzma: Clarify comment in block.h.Jia Tan1-1/+2
2023-02-03liblzma: Improve documentation for block.h.Jia Tan1-21/+75
Standardizing each function to always specify params and return values. Output pointer parameters are also marked with doxygen style [out] to make it clear. Any note sections were also moved above the parameter and return sections for consistency.
2023-02-03liblzma: Clarify a comment about LZMA_STR_NO_VALIDATION.Jia Tan1-2/+3
The flag description for LZMA_STR_NO_VALIDATION was previously confusing about the treatment for filters than cannot be used with .xz format (lzma1) without using LZMA_STR_ALL_FILTERS. Now, it is clear that LZMA_STR_NO_VALIDATION is not a super set of LZMA_STR_ALL_FILTERS.
2023-02-03liblzma: Fix documentation in filter.h for lzma_str_to_filters()Jia Tan1-1/+1
The previous documentation for lzma_str_to_filters() was technically correct, but misleading. lzma_str_to_filters() returns NULL on success, which is in practice always defined to 0. This is the same value as LZMA_OK, but lzma_str_to_filters() does not return lzma_ret so we should be more clear.
2023-02-03liblzma: Set documentation on all reserved fields to private.Jia Tan7-0/+173
This prevents the reserved fields from being part of the generated Doxygen documentation.
2023-02-03liblzma: Highlight liblzma API headers should not be included directly.Jia Tan14-28/+42
This improves the generated Doxygen HTML files to better highlight how to properly use the liblzma API header files.
2023-01-11Bump version and soname for 5.4.1.larhzu/v5.4.1Lasse Collin1-1/+1
2022-12-13Bump version to 5.4.0 and soname to 5.4.0.larhzu/v5.4.0Lasse Collin1-3/+3
2022-12-11liblzma: Change LZMA_FILTER_ARM64 to the official Filter ID 0x0A.Lasse Collin1-5/+1
2022-12-01Bump version number for 5.3.5beta.larhzu/v5.3.5betaLasse Collin1-2/+2
This also sorts the symbol names alphabetically in liblzma_*.map.
2022-12-01liblzma: Omit zero-skipping from ARM64 filter.Lasse Collin1-1/+1
It has some complicated downsides and its usefulness is more limited than I originally thought. So this change is bad for certain very specific situations but a generic solution that works for other filters (and is otherwise better too) is planned anyway. And this way 7-Zip can use the same compatible filter for the .7z format. This is still marked as experimental with a new temporary Filter ID.
2022-12-01liblzma: Don't be over-specific in lzma_str_to_filters API doc.Lasse Collin1-2/+1
2022-11-29liblzma: Improve documentation for string to filter functions.Jia Tan1-8/+9
2022-11-29liblzma: Two fixes to lzma_str_list_filters() API docs.Lasse Collin1-3/+3
Thanks to Jia Tan.
2022-11-28liblzma: Add lzma_str_to_filters, _from_filters, and _list_filters.Lasse Collin1-0/+258
lzma_str_to_filters() uses static error messages which makes them not very precise. It tells the position in the string where an error occurred though which helps quite a bit if applications take advantage of it. Dynamic error messages can be added later with a new flag if it seems important enough.
2022-11-27liblzma: Add LZMA_FILTER_LZMA1EXT to support LZMA1 without end marker.Lasse Collin1-7/+116
Some file formats need support for LZMA1 streams that don't use the end of payload marker (EOPM) alias end of stream (EOS) marker. So far liblzma API has supported decompressing such streams via lzma_alone_decoder() when .lzma header specifies a known uncompressed size. Encoding support hasn't been available in the API. Instead of adding a new LZMA1-only API for this purpose, this commit adds a new filter ID for use with raw encoder and decoder. The main benefit of this approach is that then also filter chains are possible, for example, if someone wants to implement support for .7z files that use the x86 BCJ filter with LZMA1 (not BCJ2 as that isn't supported in liblzma).
2022-11-24liblzma: Add lzma_filters_update() support to the multi-threaded encoder.Lasse Collin1-15/+21
A tiny downside of this is that now a 1-4 tiny allocations are made for every Block because each worker thread needs its own copy of the filter chain.
2022-11-24liblzma: Add new API function lzma_filters_free().Lasse Collin1-0/+21
This is small but convenient and should have been added a long time ago.
2022-11-23liblzma: Add lzma_attr_warn_unused_result to lzma_filters_copy().Lasse Collin1-1/+2
2022-11-21liblzma: Fix two Doxygen commands in the API headers.Lasse Collin2-2/+2
These were caught by clang -Wdocumentation.
2022-11-15Bump version number for 5.3.4alpha.larhzu/v5.3.4alphaLasse Collin1-1/+1
2022-11-14Replace the experimental ARM64 filter with a new experimental version.Lasse Collin1-33/+8
This is incompatible with the previous version. This has space/tab fixes in filter_*.c and bcj.h too.
2022-11-09liblzma: Add .lz support to lzma_auto_decoder().Lasse Collin1-4/+6
Thanks to Michał Górny for the original patch.
2022-11-09liblzma: Add .lz (lzip) decompression support (format versions 0 and 1).Lasse Collin1-2/+60
Support for format version 0 was removed from lzip 1.18 for some reason. .lz format version 0 files are rare (and old) but some source packages were released in this format, and some people might have personal files in this format too. It's very little extra code to support it along side format version 1 so this commits adds support for both. The Sync Flush marker extentension to the original .lz format version 1 isn't supported. It would require changes to the LZMA decoder itself. Such files are very rare anyway. See the API doc for lzma_lzip_decoder() for more details about the .lz format support. Thanks to Michał Górny for the original patch.
2022-11-08liblzma: Update API docs about decoder flags.Lasse Collin1-4/+17
2022-09-30liblzma: Add API doc note about the .xz decoder LZMA_MEMLIMIT_ERROR bug.Lasse Collin1-0/+11
The bug was fixed in 660739f99ab211edec4071de98889fb32ed04e98.
2022-09-20liblzma: ARM64: Fix wrong comment in API doc.Lasse Collin1-2/+2
Thanks to Jia Tan.
2022-09-19liblzma: Add experimental ARM64 BCJ filter with a temporary Filter ID.Lasse Collin1-1/+34
That is, the Filter ID will be changed once the design is final. The current version will be removed. So files created with the tempoary Filter ID won't be supported in the future.
2022-09-09liblzma: lzma_filters_copy: Keep dest[] unmodified if an error occurs.Lasse Collin1-1/+3
lzma_stream_encoder() and lzma_stream_encoder_mt() always assumed this. Before this patch, failing lzma_filters_copy() could result in free(invalid_pointer) or invalid memory reads in stream_encoder.c or stream_encoder_mt.c. To trigger this, allocating memory for a filter options structure has to fail. These are tiny allocations so in practice they very rarely fail. Certain badness in the filter chain array could also make lzma_filters_copy() fail but both stream_encoder.c and stream_encoder_mt.c validate the filter chain before trying to copy it, so the crash cannot occur this way.
2022-08-22Bump version number for 5.3.3alpha.larhzu/v5.3.3alphaLasse Collin1-1/+1
2022-08-18liblzma: Threaded decoder: Improve LZMA_FAIL_FAST when LZMA_FINISH is used.Lasse Collin1-0/+6
It will now return LZMA_DATA_ERROR (not LZMA_OK or LZMA_BUF_ERROR) if LZMA_FINISH is used and there isn't enough input to finish decoding the Block Header or the Block. The use of LZMA_DATA_ERROR is simpler and the less risky than LZMA_BUF_ERROR but this might be changed before 5.4.0.
2022-04-06liblzma: Add a new flag LZMA_FAIL_FAST for threaded decoder.Lasse Collin1-1/+24
In most cases if the input file is corrupt the application won't care about the uncompressed content at all. With this new flag the threaded decoder will return an error as soon as any thread has detected an error; it won't wait to copy out the data before the location of the error. I don't plan to use this in xz to keep the behavior consistent between single-threaded and multi-threaded modes.
2022-03-07liblzma: Add threaded .xz decompressor.Lasse Collin1-7/+83
I realize that this is about a decade late. Big thanks to Sebastian Andrzej Siewior for the original patch. I made a bunch of smaller changes but after a while quite a few things got rewritten. So any bugs in the commit were created by me.
2022-03-06liblzma: Fix docs: lzma_block_decoder() cannot return LZMA_UNSUPPORTED_CHECK.Lasse Collin1-3/+0
If Check is unsupported, it will be silently ignored. It's the caller's job to handle it.
2022-02-22liblzma: Minor addition to lzma_vli_size() API doc.Lasse Collin1-0/+2
Thanks to Jia Tan.
2021-10-28Bump the version number for 5.3.2alpha.larhzu/v5.3.2alphaLasse Collin1-1/+1
2021-09-09liblzma: Use _MSVC_LANG to detect when "noexcept" can be used with MSVC.Lasse Collin1-1/+2
By default, MSVC always sets __cplusplus to 199711L. The real C++ standard version is available in _MSVC_LANG (or one could use /Zc:__cplusplus to set __cplusplus correctly). Fixes <https://sourceforge.net/p/lzmautils/discussion/708858/thread/f6bc3b108a/>. Thanks to Dan Weiss.
2021-09-05liblzma: Rename EROFS LZMA to MicroLZMA.Lasse Collin1-14/+19
It still exists primarily for EROFS but MicroLZMA is a more generic name (that hopefully doesn't clash with something that already exists).
2021-01-17liblzma: Make EROFS LZMA decoder work when exact uncomp_size isn't known.Lasse Collin1-5/+18
The caller must still not specify an uncompressed size bigger than the actual uncompressed size. As a downside, this now needs the exact compressed size.
2021-01-14liblzma: Add EROFS LZMA encoder and decoder.Lasse Collin1-0/+76
Right now this is just a planned extra-compact format for use in the EROFS file system in Linux. At this point it's possible that the format will either change or be abandoned and removed completely. The special thing about the encoder is that it uses the output-size-limited encoding added in the previous commit. EROFS uses fixed-sized blocks (e.g. 4 KiB) to hold compressed data so the compressors must be able to create valid streams that fill the given block size.
2020-03-23Typo fixes from fossies.org.Lasse Collin1-1/+1
https://fossies.org/linux/misc/xz-5.2.5.tar.xz/codespell.html
2020-02-22Use defined(__GNUC__) before __GNUC__ in preprocessor lines.Lasse Collin1-2/+3
This should silence the equivalent of -Wundef in compilers that don't define __GNUC__.
2019-06-24Add LZMA_RET_INTERNAL1..8 to lzma_ret and use one for LZMA_TIMED_OUT.Lasse Collin1-1/+14
LZMA_TIMED_OUT is *internally* used as a value for lzma_ret enumeration. Previously it was #defined to 32 and cast to lzma_ret. That way it wasn't visible in the public API, but this was hackish. Now the public API has eight LZMA_RET_INTERNALx members and LZMA_TIMED_OUT is #defined to LZMA_RET_INTERNAL1. This way the code is cleaner overall although the public API has a few extra mysterious enum members.
2019-05-11spellingAntoine Cœur4-4/+4
2018-05-19liblzma: Improve lzma_properties_decode() API documentation.Lasse Collin1-3/+4
2018-04-29Bump the version number to 5.3.1alpha.larhzu/v5.3.1alphaLasse Collin1-1/+1
2018-02-06nothrow: use noexcept for C++11 and newerBen Boeckel1-1/+5
In C++11, the `throw()` specifier is deprecated and `noexcept` is preffered instead.
2017-04-24liblzma: Add lzma_file_info_decoder().Lasse Collin1-0/+66
2017-04-21liblzma: Rename LZMA_SEEK to LZMA_SEEK_NEEDED and seek_in to seek_pos.Lasse Collin1-9/+9
2017-03-30liblzma: Add generic support for input seeking (LZMA_SEEK).Lasse Collin1-1/+30
Also mention LZMA_SEEK in xz/message.c to silence a warning.
2017-03-30liblzma: Fix lzma_memlimit_set(strm, 0).Lasse Collin1-1/+6
The 0 got treated specially in a buggy way and as a result the function did nothing. The API doc said that 0 was supposed to return LZMA_PROG_ERROR but it didn't. Now 0 is treated as if 1 had been specified. This is done because 0 is already used to indicate an error from lzma_memlimit_get() and lzma_memusage(). In addition, lzma_memlimit_set() no longer checks that the new limit is at least LZMA_MEMUSAGE_BASE. It's counter-productive for the Index decoder and was actually needed only by the auto decoder. Auto decoder has now been modified to check for LZMA_MEMUSAGE_BASE.
2017-03-30liblzma: Similar memlimit fix for stream_, alone_, and auto_decoder.Lasse Collin1-4/+17
2017-03-30liblzma: Fix handling of memlimit == 0 in lzma_index_decoder().Lasse Collin1-7/+11
It returned LZMA_PROG_ERROR, which was done to avoid zero as the limit (because it's a special value elsewhere), but using LZMA_PROG_ERROR is simply inconvenient and can cause bugs. The fix/workaround is to treat 0 as if it were 1 byte. It's effectively the same thing. The only weird consequence is that then lzma_memlimit_get() will return 1 even when 0 was specified as the limit. This fixes a very rare corner case in xz --list where a specific memory usage limit and a multi-stream file could print the error message "Internal error (bug)" instead of saying that the memory usage limit is too low.
2015-07-12liblzma: A MSVC-specific hack isn't needed with MSVC 2013 and newer.Lasse Collin1-5/+13
2015-03-30Bump version to 5.3.0alpha and soname to 5.3.99.Lasse Collin1-3/+3
The idea of 99 is that it looks a bit weird in this context. For new features there's no API/ABI stability in devel versions.
2015-02-26Bump version and soname for 5.2.1.larhzu/v5.2.1Lasse Collin1-1/+1
2014-12-21Bump version and soname for 5.2.0.Lasse Collin1-3/+3
I know that soname != app version, but I skip AGE=1 in -version-info to make the soname match the liblzma version anyway. It doesn't hurt anything as long as it doesn't conflict with library versioning rules.
2014-12-02liblzma: Document how lzma_mt.block_size affects memory usage.Lasse Collin1-0/+4
2014-11-26Remove LZMA_UNSTABLE macro.Lasse Collin1-4/+0
2014-11-26liblzma: Update lzma_stream_encoder_mt() API docs.Lasse Collin1-2/+3
2014-09-14Bump the version number to 5.1.4beta.larhzu/v5.1.4betaLasse Collin1-2/+2
2014-08-05liblzma: Add support for LZMA_IGNORE_CHECK.Lasse Collin1-0/+24
2014-08-05liblzma: Add support for lzma_block.ignore_check.Lasse Collin1-10/+40
Note that this slightly changes how lzma_block_header_decode() has been documented. Earlier it said that the .version is set to the lowest required value, but now it says that the .version field is kept unchanged if possible. In practice this doesn't affect any old code, because before this commit the only possible .version was 0.
2014-06-18liblzma: Add lzma_cputhreads().Lasse Collin1-0/+14
2014-05-04liblzma: Rename the private API header lzma/lzma.h to lzma/lzma12.h.Lasse Collin3-3/+3
It can be confusing that two header files have the same name. The public API file is still lzma.h.
2014-01-20liblzma: Fix typo in a comment.Lasse Collin1-1/+1
2013-11-26liblzma: Document the need for block->check for lzma_block_header_decode().Lasse Collin1-0/+3
Thanks to Tomer Chachamu.
2013-10-26Bump the version number to 5.1.3alpha.larhzu/v5.1.3alphaLasse Collin1-1/+1
2013-10-02liblzma: Add LZMA_FULL_BARRIER support to single-threaded encoder.Lasse Collin1-7/+30
In the single-threaded encoder LZMA_FULL_BARRIER is simply an alias for LZMA_FULL_FLUSH.
2013-03-23liblzma: Add lzma_block_uncomp_encode().Lasse Collin1-0/+18
This also adds a new internal function lzma_block_buffer_bound64() which is similar to lzma_block_buffer_bound() but uses uint64_t instead of size_t.
2012-12-14Make the progress indicator smooth in threaded mode.Lasse Collin1-1/+21
This adds lzma_get_progress() to liblzma and takes advantage of it in xz. lzma_get_progress() collects progress information from the thread-specific structures so that fairly accurate progress information is available to applications. Adding a new function seemed to be a better way than making the information directly available in lzma_stream (like total_in and total_out are) because collecting the information requires locking mutexes. It's waste of time to do it more often than the up to date information is actually needed by an application.
2012-07-17liblzma: Make the use of lzma_allocator const-correct.Lasse Collin6-23/+29
There is a tiny risk of causing breakage: If an application assigns lzma_stream.allocator to a non-const pointer, such code won't compile anymore. I don't know why anyone would do such a thing though, so in practice this shouldn't cause trouble. Thanks to Jan Kratochvil for the patch.
2012-07-04Bump the version number to 5.1.2alpha.larhzu/v5.1.2alphaLasse Collin1-1/+1
2011-04-12Bump the version number to 5.1.1alpha and liblzma soname to 5.0.99.larhzu/v5.1.1alphaLasse Collin1-1/+1
2011-04-12Put the unstable APIs behind #ifdef LZMA_UNSTABLE.Lasse Collin1-0/+4
This way people hopefully won't complain if these APIs change and break code that used an older API.
2011-04-11liblzma: Add lzma_stream_encoder_mt() for threaded compression.Lasse Collin1-0/+163
This is the simplest method to do threading, which splits the uncompressed data into blocks and compresses them independently from each other. There's room for improvement especially to reduce the memory usage, but nevertheless, this is a good start.
2011-04-11liblzma: Document lzma_easy_(enc|dec)oder_memusage() better too.Lasse Collin1-0/+9
2011-04-11liblzma: Document lzma_raw_(enc|dec)oder_memusage() better.Lasse Collin1-2/+6
It didn't mention the return value that is used if an error occurs.
2011-04-11liblzma: API comment about lzma_allocator with threaded coding.Lasse Collin1-5/+13
2011-04-11liblzma: Fix API docs to mention LZMA_UNSUPPORTED_CHECK.Lasse Collin2-0/+4
This return value was missing from the API comments of four functions.
2010-11-15Merge branch 'v5.0'Lasse Collin1-0/+3
2010-11-15liblzma: Document the return value of lzma_lzma_preset().Lasse Collin1-0/+3
2010-10-25Bump version 5.1.0alpha.larhzu/v5.1.0alphaLasse Collin1-2/+2
2010-10-23Bump version to 5.0.0 and liblzma version-info to 5:0:0.Lasse Collin1-4/+4
2010-10-23liblzma: A few ABI tweaks to reserve space in structures.Lasse Collin3-7/+8
2010-10-21liblzma: Update the comments in the API headers.Lasse Collin12-107/+134
Adding support for LZMA_FINISH for Index encoding and decoding needed tiny additions to the relevant .c files too.
2010-10-02liblzma: Small fixes to comments in the API headers.Lasse Collin1-3/+7
2010-06-01Fix a comment.Lasse Collin1-1/+1
2010-05-26Remove the Subblock filter code for now.Lasse Collin3-202/+0
The spec isn't finished and the code didn't compile anymore. It won't be included in XZ Utils 5.0.0. It's easy to get it back once the spec is done.
2010-05-14Omit lzma_restrict from the API headers.Lasse Collin3-21/+7
It isn't really useful so omitting it makes things shorter and slightly more readable.
2010-02-12Collection of language fixes to comments and docs.Lasse Collin9-15/+15
Thanks to Jonathan Nieder.
2010-02-07Subtle change to liblzma Block handling API.Lasse Collin1-22/+17
lzma_block.version has to be initialized even for lzma_block_header_decode(). This way a future version of liblzma won't allocate memory in a way that an old application doesn't know how to free it. The subtlety of this change is that all current apps using lzma_block_header_decode() will keep working for now, because the only possible version value is zero, and lzma_block_header_decode() unconditionally sets the version to zero even now. Unless fixed, these apps will break in the future if a new version of the Block options is ever needed.
2010-01-01Fix _memconfig() functions.Lasse Collin1-7/+0
This affects lzma_memusage() and lzma_memlimit_get().
2009-12-31Revised the Index handling code.Lasse Collin1-146/+426
This breaks API and ABI but most apps are not affected since most apps don't use this part of the API. You will get a compile error if you are using anything that got broken. Summary of changes: - Ability to store Stream Flags, which are needed for random-access reading in multi-Stream files. - Separate function to set size of Stream Padding. - Iterator structure makes it possible to read the same lzma_index from multiple threads at the same time. - A lot faster code to locate Blocks. - Removed lzma_index_equal() without adding anything to replace it. I don't know what it should do exactly with the new features and what actually needs this function in the first place other than test_index.c, which now has its own code to compare lzma_indexes.
2009-12-31Add missing lzma_nothrow in filter.h.Lasse Collin1-2/+2
2009-12-09Always rely on GCC's auto-import on Windows.Lasse Collin1-7/+9
I understood that this is nicer, because then people don't need to worry about the LZMA_API_STATIC macro. Thanks to Charles Wilson and Keith Marshall.
2009-11-25Index decoder fixes.Lasse Collin1-11/+12
The Index decoder code didn't perfectly match the API docs, which said that *i will be set to point to the decoded Index only after decoding has succeeded. The docs were a bit unclear too. Now the decoder will initially set *i to NULL. *i will be set to point to the decoded Index once decoding has succeeded. This simplifies applications too, since it avoids dangling pointers.
2009-11-15Add lzma_physmem().Lasse Collin3-0/+55
I had hoped to keep liblzma as purely a compression library as possible (e.g. file I/O will go into a different library), but it seems that applications linking agaisnt liblzma need some way to determine the memory usage limit, and knowing the amount of RAM is one reasonable way to help making such decisions. Thanks to Jonathan Nieder for the original patch.
2009-11-14Fix a design error in liblzma API.Lasse Collin2-13/+30
Originally the idea was that using LZMA_FULL_FLUSH with Stream encoder would read the filter chain from the same array that was used to intialize the Stream encoder. Since most apps wouldn't use LZMA_FULL_FLUSH, most apps wouldn't need to keep the filter chain available after initializing the Stream encoder. However, due to my mistake, it actually required keeping the array always available. Since setting the new filter chain via the array used at initialization time is not a nice way to do it for a couple of reasons, this commit ditches it and introduces lzma_filters_update(). This new function replaces also the "persistent" flag used by LZMA2 (and to-be-designed Subblock filter), which was also an ugly thing to do. Thanks to Alexey Tourbin for reminding me about the problem that Stream encoder used to require keeping the filter chain allocated.
2009-10-17Fix wrong function name in the previous commit.Lasse Collin1-1/+1
It was meant to be lzma_filters_copy(), not lzma_filters_dup().
2009-10-17Add lzma_filters_copy().Lasse Collin1-0/+31
This will be needed internally by liblzma once I fix a design mistake in the encoder API. This function may be useful to applications too so it's good to export it.
2009-09-15Fix incorrect use of "restrict".Lasse Collin1-2/+2
2009-09-12Fix GCC version check for nothrow attribute.Lasse Collin1-1/+1
2009-09-12A few grammar fixes.Lasse Collin2-4/+4
Thanks to Christian Weisgerber for pointing out some of these.
2009-08-27Bumped version to 4.999.9beta.Lasse Collin1-1/+1
2009-08-27Updates to liblzma API headers.Lasse Collin12-197/+275
Added lzma_nothrow for every function. It adds throw() when the header is used in C++ code. Some lzma_attrs were added or removed. Lots of comments were improved.
2009-06-26Basic support for building with Cygwin and MinGW usingLasse Collin1-2/+5
the Autotools based build system. It's not good yet, more fixes will follow.
2009-05-26Make the raw value of the Check field available to applicationsLasse Collin1-0/+17
via lzma_block structure. This changes ABI but not doesn't break API.
2009-04-13Put the interesting parts of XZ Utils into the public domain.Lasse Collin16-198/+139
Some minor documentation cleanups were made at the same time.
2009-02-18Added files missing from the previous commit.Lasse Collin1-0/+33
2009-02-13Changed how the version number is specified in various places.Lasse Collin1-3/+67
Now configure.ac will get the version number directly from src/liblzma/api/lzma/version.h. The intent is to reduce the number of places where the version number is duplicated. In future, support for displaying Git commit ID may be added too.
2009-02-07Introduced LZMA_API_STATIC macro, which the applicationsLasse Collin1-7/+24
need to #define when linking against static liblzma on platforms like Windows. Most developers don't need to care about LZMA_API_STATIC at all.
2009-02-02Modify LZMA_API macro so that it works on Windows withLasse Collin12-87/+88
other compilers than MinGW. This may hurt readability of the API headers slightly, but I don't know any better way to do this.
2009-02-01Added initial version of raw buffer-to-buffer codingLasse Collin1-20/+64
functions, and cleaned up filter.h API header a little. May be very buggy, not tested yet.
2009-02-01Use __cdecl also for function pointers in liblzma API whenLasse Collin2-9/+13
on Windows.
2009-01-31Add LZMA_API to liblzma API headers. It's useful at leastLasse Collin12-84/+117
on Windows. sysdefs.h no longer #includes lzma.h, so lzma.h has to be #included separately where needed.
2009-01-31Fix two lines in lzma.h on which the # wasn't at theLasse Collin1-2/+2
beginning of the line.
2009-01-31Add support for using liblzma headers in MSVC, which has noLasse Collin1-24/+46
stdint.h or inttypes.h.
2009-01-31Fix # -> ## in a macro in lzma.h.Lasse Collin1-1/+1
2009-01-26Add lzma_block_buffer_decode().Lasse Collin1-0/+41
2009-01-23Added lzma_stream_buffer_decode() and made minor cleanups.Lasse Collin2-2/+52
2009-01-20Add some single-call buffer-to-buffer coding functions.Lasse Collin3-6/+177
2009-01-17Beta was supposed to be API stable but I had forgot to renameLasse Collin1-2/+2
lzma_memlimit_encoder and lzma_memlimit_decoder to lzma_raw_encoder_memlimit and lzma_raw_decoder_memlimit. :-( Now it is fixed. Hopefully it doesn't cause too much trouble to those who already thought API is stable.
2008-12-31Bumped version to 4.999.8beta right after the releaseLasse Collin1-1/+1
of 4.999.7beta.
2008-12-31Prepare for 4.999.7beta release.Lasse Collin1-1/+1
2008-12-31Cleaned up some comments in the API headers.Lasse Collin3-14/+15
2008-12-31Renamed lzma_options_simple to lzma_options_bcj in the API.Lasse Collin3-13/+13
The internal implementation is still using the name "simple". It may need some cleanups, so I look at it later.
2008-12-31Remove lzma_init() and other init functions from liblzma API.Lasse Collin3-87/+0
Half of developers were already forgetting to use these functions, which could have caused total breakage in some future liblzma version or even now if --enable-small was used. Now liblzma uses pthread_once() to do the initializations unless it has been built with --disable-threads which make these initializations thread-unsafe. When --enable-small isn't used, liblzma currently gets needlessly linked against libpthread (on systems that have it). While it is stupid for now, liblzma will need threads in future anyway, so this stupidity will be temporary only. When --enable-small is used, different code CRC32 and CRC64 is now used than without --enable-small. This made the resulting binary slightly smaller, but the main reason was to clean it up and to handle the lack of lzma_init_check(). The pkg-config file lzma.pc was renamed to liblzma.pc. I'm not sure if it works correctly and portably for static linking (Libs.private includes -pthread or other operating system specific flags). Hopefully someone complains if it is bad. lzma_rc_prices[] is now included as a precomputed array even with --enable-small. It's just 128 bytes now that it uses uint8_t instead of uint32_t. Smaller array seemed to be at least as fast as the more bloated uint32_t array on x86; hopefully it's not bad on other architectures.
2008-12-27Bunch of liblzma tweaks, including some API changes.Lasse Collin4-61/+127
The API and ABI should now be very close to stable, although the code behind it isn't yet.
2008-12-17Remove the alignment functions for now. Maybe they willLasse Collin3-62/+0
be added back in some form later, but the current version wasn't modular, so it would need fixing anyway.
2008-12-15Bunch of liblzma API cleanups and fixes.Lasse Collin15-355/+584
2008-11-25Remove the nowadays unneeded memory limitting malloc() wrapper.Lasse Collin3-209/+0
2008-11-19Oh well, big messy commit again. Some highlights:Lasse Collin4-24/+55
- 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
2008-10-07Made the preset numbering more logical in liblzma API.Lasse Collin2-11/+11
2008-09-27Some API changes, bug fixes, cleanups etc.Lasse Collin2-89/+149
2008-09-17Miscellaneous LZ and LZMA encoder cleanupsLasse Collin1-14/+0
2008-09-13Renamed constants:Lasse Collin10-59/+59
- LZMA_VLI_VALUE_MAX -> LZMA_VLI_MAX - LZMA_VLI_VALUE_UNKNOWN -> LZMA_VLI_UNKNOWN - LZMA_HEADER_ERRRO -> LZMA_OPTIONS_ERROR
2008-09-12Improved the Stream Flags handling API.Lasse Collin1-4/+80
2008-09-10Bumped version to 4.999.6alpha.Lasse Collin1-1/+1
2008-09-10Filter handling cleanupsLasse Collin1-31/+102
2008-09-10Cleaned up Block encoder and moved the no longer sharedLasse Collin1-3/+0
code from block_private.h to block_decoder.c. Now the Block encoder doesn't need compressed_size and uncompressed_size from lzma_block structure to be initialized.
2008-09-07Changed Filter ID of LZMA to 0x20.Lasse Collin1-1/+1
2008-09-06CommentsLasse Collin2-30/+57
2008-09-06Some API cleanupsLasse Collin3-127/+237
2008-08-28Sort of garbage collection commit. :-| Many things are stillLasse Collin23-668/+782
broken. API has changed a lot and it will still change a little more here and there. The command line tool doesn't have all the required changes to reflect the API changes, so it's easy to get "internal error" or trigger assertions.
2008-06-19Add limit of lc + lp <= 4. Now we can allocate theLasse Collin1-1/+9
literal coder as part of the main LZMA encoder or decoder structure. Make the LZMA decoder to rely on the current internal API to free the allocated memory in case an error occurs.
2008-06-18Update the code to mostly match the new simpler file formatLasse Collin21-1198/+526
specification. Simplify things by removing most of the support for known uncompressed size in most places. There are some miscellaneous changes here and there too. The API of liblzma has got many changes and still some more will be done soon. While most of the code has been updated, some things are not fixed (the command line tool will choke with invalid filter chain, if nothing else). Subblock filter is somewhat broken for now. It will be updated once the encoded format of the Subblock filter has been decided.
2008-05-06Bunch of grammar fixes from meyering.Lasse Collin1-3/+3
2008-05-06Typo fixLasse Collin1-1/+1
2008-04-28Fixed wrong spelling "limitter" to "limiter". This affectsLasse Collin3-9/+9
liblzma's API.
2008-04-25Bumped version number to 4.999.3alpha. It will become 5.0.0Lasse Collin1-12/+10
once we have a stable release (won't be very soon). The version number is no longer related to version of LZMA SDK. Made some small Automake-related changes to toplevel Makefile.am and configure.ac.
2008-03-14Fix a comment API header.Lasse Collin1-1/+1
2008-03-12Make lzma_stream.next_in const. Let's see if anyone complains.Lasse Collin1-1/+1
2008-01-26Added api/lzma/easy.h. I had forgot to add this to theLasse Collin1-0/+174
git repo. Thanks to Stephan Kulow.
2008-01-26Return LZMA_HEADER_ERROR if LZMA_SYNC_FLUSH is used with anyLasse Collin1-0/+9
of the so called simple filters. If there is demand, limited support for LZMA_SYNC_FLUSH may be added in future. After this commit, using LZMA_SYNC_FLUSH shouldn't cause undefined behavior in any situation.
2008-01-25Improved the memory limitter:Lasse Collin1-0/+35
- Added lzma_memlimit_max() and lzma_memlimit_reached() API functions. - Added simple estimation of malloc()'s memory usage overhead. - Fixed integer overflow detection in lzma_memlimit_alloc(). - Made some white space cleanups and added more comments. The description of lzma_memlimit_max() in memlimit.h is bad and should be improved.
2008-01-22Added lzma_easy_* functions. These should make usingLasse Collin2-0/+2
liblzma as easy as using zlib, because the easy API don't require developers to know any fancy LZMA options. Note that Multi-Block Stream encoding is currently broken. The easy API should be OK, the bug(s) are elsewhere.
2008-01-22Made lzma_extra pointers const in lzma_options_stream.Lasse Collin1-2/+2