aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2013-02-27 09:34:49 +0200
committerLasse Collin <lasse.collin@tukaani.org>2013-02-27 09:34:49 +0200
commit25a0224510ba143251e6df122b649b3b3b0b0257 (patch)
tree4bee79003d367e539aff200b3c622d831f55524b
parent0568cfabccc8a23b4d4a23266b39bf14134df434 (diff)
downloadxz-embedded-25a0224510ba143251e6df122b649b3b3b0b0257.tar.gz
Document integrity check #defines in README.
-rw-r--r--README36
1 files changed, 36 insertions, 0 deletions
diff --git a/README b/README
index 00cae58..566d604 100644
--- a/README
+++ b/README
@@ -84,6 +84,42 @@ Embedding into userspace applications
environment. Probably you should at least skim through it even if the
default file works as is.
+Integrity check support
+
+ XZ Embedded always supports the integrity check types None and
+ CRC32. Support for CRC64 is optional. SHA-256 is currently not
+ supported in XZ Embedded although the .xz format does support it.
+ The xz tool from XZ Utils uses CRC64 by default, but CRC32 is usually
+ enough in embedded systems to keep the code size smaller.
+
+ If you want support for CRC64, you need to copy linux/lib/xz/xz_crc64.c
+ into your application, and #define XZ_USE_CRC64 in xz_config.h or in
+ compiler flags.
+
+ When using the internal CRC32 or CRC64, their lookup tables need to be
+ initialized with xz_crc32_init() and xz_crc64_init(), respectively.
+ See xz.h for details.
+
+ To use external CRC32 or CRC64 code instead of the code from
+ xz_crc32.c or xz_crc64.c, the following #defines may be used
+ in xz_config.h or in compiler flags:
+
+ #define XZ_INTERNAL_CRC32 0
+ #define XZ_INTERNAL_CRC64 0
+
+ Then it is up to you to provide compatible xz_crc32() or xz_crc64()
+ functions.
+
+ If the .xz file being decompressed uses an integrity check type that
+ isn't supported by XZ Embedded, it is treated as an error and the
+ file cannot be decompressed. For multi-call mode, this can be modified
+ by #defining XZ_DEC_ANY_CHECK. Then xz_dec_run() will return
+ XZ_UNSUPPORTED_CHECK when unsupported check type is detected. After
+ that decompression can be continued normally except that the
+ integrity check won't be verified. In single-call mode there's
+ no way to continue decoding, so XZ_DEC_ANY_CHECK is almost useless
+ in single-call mode.
+
BCJ filter support
If you want support for one or more BCJ filters, you need to copy also