Squashfs: Add LZ4 compression configuration option
[linux-2.6-block.git] / fs / squashfs / decompressor.c
index ac22fe73b0adc241449c35e58faf535d510bb3ec..e9034bf6e5ae27bb3e2379e0816e2b11d5ed41b1 100644 (file)
@@ -41,6 +41,12 @@ static const struct squashfs_decompressor squashfs_lzma_unsupported_comp_ops = {
        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
@@ -65,6 +71,7 @@ static const struct squashfs_decompressor squashfs_unknown_comp_ops = {
 
 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,