Add the glue code, and also update the documentation.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
 =======================
 
 Squashfs is a compressed read-only filesystem for Linux.
-It uses zlib/lzo/xz compression to compress files, inodes and directories.
-Inodes in the system are very small and all blocks are packed to minimise
-data overhead. Block sizes greater than 4K are supported up to a maximum
-of 1Mbytes (default block size 128K).
+It uses zlib, lz4, lzo, or xz compression to compress files, inodes and
+directories.  Inodes in the system are very small and all blocks are packed to
+minimise data overhead. Block sizes greater than 4K are supported up to a
+maximum of 1Mbytes (default block size 128K).
 
 Squashfs is intended for general read-only filesystem use, for archival
 use (i.e. in cases where a .tar.gz file may be used), and in constrained
 
 
          If unsure, say Y.
 
+config SQUASHFS_LZ4
+       bool "Include support for LZ4 compressed file systems"
+       depends on SQUASHFS
+       select LZ4_DECOMPRESS
+       help
+         Saying Y here includes support for reading Squashfs file systems
+         compressed with LZ4 compression.  LZ4 compression is mainly
+         aimed at embedded systems with slower CPUs where the overheads
+         of zlib are too high.
+
+         LZ4 is not the standard compression used in Squashfs and so most
+         file systems will be readable without selecting this option.
+
+         If unsure, say N.
+
 config SQUASHFS_LZO
        bool "Include support for LZO compressed file systems"
        depends on SQUASHFS
 
 squashfs-$(CONFIG_SQUASHFS_DECOMP_MULTI) += decompressor_multi.o
 squashfs-$(CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU) += decompressor_multi_percpu.o
 squashfs-$(CONFIG_SQUASHFS_XATTR) += xattr.o xattr_id.o
+squashfs-$(CONFIG_SQUASHFS_LZ4) += lz4_wrapper.o
 squashfs-$(CONFIG_SQUASHFS_LZO) += lzo_wrapper.o
 squashfs-$(CONFIG_SQUASHFS_XZ) += xz_wrapper.o
 squashfs-$(CONFIG_SQUASHFS_ZLIB) += zlib_wrapper.o
 
        NULL, NULL, NULL, NULL, LZMA_COMPRESSION, "lzma", 0
 };
 
+#ifndef CONFIG_SQUASHFS_LZ4
+static const struct squashfs_decompressor squashfs_lz4_comp_ops = {
+       NULL, NULL, NULL, NULL, LZ4_COMPRESSION, "lz4", 0
+};
+#endif
+
 #ifndef CONFIG_SQUASHFS_LZO
 static const struct squashfs_decompressor squashfs_lzo_comp_ops = {
        NULL, NULL, NULL, NULL, LZO_COMPRESSION, "lzo", 0
 
 static const struct squashfs_decompressor *decompressor[] = {
        &squashfs_zlib_comp_ops,
+       &squashfs_lz4_comp_ops,
        &squashfs_lzo_comp_ops,
        &squashfs_xz_comp_ops,
        &squashfs_lzma_unsupported_comp_ops,
 
 extern const struct squashfs_decompressor squashfs_xz_comp_ops;
 #endif
 
+#ifdef CONFIG_SQUASHFS_LZ4
+extern const struct squashfs_decompressor squashfs_lz4_comp_ops;
+#endif
+
 #ifdef CONFIG_SQUASHFS_LZO
 extern const struct squashfs_decompressor squashfs_lzo_comp_ops;
 #endif