aboutsummaryrefslogtreecommitdiff
path: root/linux/lib
AgeCommit message (Collapse)Author
2010-05-30Support decompressing files with unsupported check types.Lasse Collin
This is enabled at compile time by defining XZ_DEC_ANY_CHECK. If the Check ID is not supported, xz_dec_run() will return XZ_UNSUPPORTED_CHECK. In multi-call mode, decoding can be then continued normally. In single-call mode, decoding cannot be continued, thus this feature is useful only in multi-call mode.
2010-05-30Use 0/1 instead of defined/undefined for XZ_INTERNAL_CRC32.Lasse Collin
Code that used #define XZ_INTERNAL_CRC32 will now need to use: #define XZ_INTERNAL_CRC32 1 This is to make it a little bit easier to use external CRC32 implementation outside the Linux kernel by using #define XZ_INTERNAL_CRC32 0 and then providing xz_crc32() e.g. via xz_config.h.
2010-05-30Make it simpler to build without BCJ filters.Lasse Collin
Now xz_dec_bcj.c can be compiled even when no BCJ filters are enabled (but only if the compiler supports files that don't export any symbols). It also allows #including it unconditionally in decompress_unxz.c.
2010-05-30Silence compiler warnings.Lasse Collin
Thanks to Denys Vlasenko.
2009-09-02Small fixes to decompress_unxz.c to make it workLasse Collin
correctly for initramfs decompression.
2009-09-01Fix infinite loop in single-call mode.Lasse Collin
If the input file has BCJ filter and the output buffer is too small in single-call mode, the LZMA2 decoder went into an infinite loop. The actual bug was in the BCJ decoder though, which called the LZMA2 decoder twice when the output buffer was too small.
2009-09-01Define XZ_IOBUF_SIZE.Lasse Collin
Linux 2.6.31-rc8 doesn't have COMPR_IOBUF_SIZE.
2009-09-01Comment out "#define memcpy memmove" in decompress_unxz.c.Lasse Collin
It breaks existing boot code. Hopefully Linux will have basic boot time utility functions unified across archs some day.
2009-09-01Remove an outdated comment.Lasse Collin
2009-09-01Silence a compiler warning.Lasse Collin
Suggested by Thorsten Glaser.
2009-05-27Updated decompress_unxz.c to match the actual API that isLasse Collin
used for kernel, initramfs, and initrd decompression. Docs for that API have been sent upstream, so the docs aren't repeated in decompress_unxz.c.
2009-05-26Fix uint64_t -> vli_type.Lasse Collin
2009-05-26Avoid integer division, since it's not necessarily availableLasse Collin
in early boot code in the Linux kernel. Thanks to Alain Knaff for pointing this out. It's possible that the compiler already avoided divide instructions, but since there wasn't much to change, it was simplest to change the code to be sure.
2009-05-26Reworked the code that is inteded to be usable for kernelLasse Collin
and initramfs decompression. Linux 2.6.30 will have bzip2 and lzma support. This commit adds a wrapper to convert the native XZ decompressor API to the decompressor API that is used for kernel and initramfs decompression in 2.6.30.
2009-05-25Add XZ_EXTERN macro and use it to mark all functions withLasse Collin
external linkage. This is needed to support marking those functions as static in some situations in the Linux kernel. XZ_EXTERN may be used for dllimport/dllexport too on some other operating systems.
2009-05-25Use memzero()s to initialize a few more variables and shortenLasse Collin
the code slightly in xz_dec_stream.c.
2009-04-27Remove an empty line.Lasse Collin
2009-04-27Added missing XZ_FUNC macros.Lasse Collin
2009-04-27Refactor xz_dec_stream.c to silence a checkpatch.pl warning.Lasse Collin
2009-04-27Define VLI_BYTES_MAX macro and use it in dec_vli().Lasse Collin
This makes it possible to use uint32_t as vli_type. Doing so risks having some integer overflows unless the caller can ensure that the total amounts of input and output will stay below 256 MiB.
2009-04-27Fix checkpatch.pl warning in xz_dec_lzma2.c.Lasse Collin
2009-04-27Don't check for NULL argument in xz_dec_reset() sinceLasse Collin
such a check isn't done in xz_dec_run() anyway. (It's still good to leave the check in xz_dec_end().)
2009-04-27Use xz_dec_bcj_end() instead of kfree() in errorLasse Collin
handling in xz_dec_init().
2009-04-27Fix two checkpatch.pl warnings.Lasse Collin
2009-04-26Fix bool -> tristate for XZ_DEC_TEST in Kconfig.Lasse Collin
2009-04-26Added xz_dec_test module to test the XZ decoder in kernel space.Lasse Collin
2009-04-26Bump the xz_dec module version number to 0.2.Lasse Collin
2009-04-26Split the userspace defitions from xz_private.h intoLasse Collin
xz_config.h, and generally clean up xz_private.h a little. Use get_unaligned_le32 and other macros provided by Linux in xz_dec_stream.c and xz_dec_bcj.c.
2009-04-26Fix XZ_DEC_PPC -> XZ_DEC_POWERPC in xz_boot.c.Lasse Collin
2009-04-18Fixed a coding style typo.Lasse Collin
2009-04-18Added BCJ filter decoders.Lasse Collin
2009-04-17Fix infinite loop in LZMA2 decoder.Lasse Collin
2009-03-22Initial commitLasse Collin