Skip to contentSkip to conversation

crypto: Add LZO compression support to the crypto interface

PATCH In review Richard Purdie 1 participant 1 message May 4, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 5/5 crypto: Add LZO compression support to the crypto interface

Add LZO1X compression support to the crypto interface, including a couple of tests.

Also convert test_deflate into a more generic test_compress() and avoid duplicating the data for compression and decompression tests since this can always work both ways in the compression case.

---
 crypto/Kconfig      |    8 +++
 crypto/Makefile     |    1 +
 crypto/crypto_lzo.c |  121 +++++++++++++++++++++++++++++++++++++++++++++++++++
 crypto/tcrypt.c     |   43 ++++++++----------
 crypto/tcrypt.h     |   75 ++++++++++++++++++--------------
 5 files changed, 191 insertions(+), 57 deletions(-)
crypto/Kconfig +8 -0
index 086fcec..8a479d5 100644
@@ -406,6 +406,14 @@ config CRYPTO_DEFLATE
 	  
 	  You will most probably want this if using IPSec.
 
+config CRYPTO_LZO
+	tristate "LZO compression algorithm"
+	depends on CRYPTO
+	select LZO
+	help
+	  Enable use of the LZO compression algorithm through the crypto
+	  subsystem.
+
 config CRYPTO_MICHAEL_MIC
 	tristate "Michael MIC keyed digest algorithm"
 	select CRYPTO_ALGAPI
crypto/Makefile +1 -0
index 12f93f5..b4bc7ca 100644
@@ -44,6 +44,7 @@ obj-$(CONFIG_CRYPTO_TEA) += tea.o
 obj-$(CONFIG_CRYPTO_KHAZAD) += khazad.o
 obj-$(CONFIG_CRYPTO_ANUBIS) += anubis.o
 obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o
+obj-$(CONFIG_CRYPTO_LZO) += crypto_lzo.o
 obj-$(CONFIG_CRYPTO_MICHAEL_MIC) += michael_mic.o
 obj-$(CONFIG_CRYPTO_CRC32C) += crc32c.o
 
crypto/crypto_lzo.c new file +121 -0

121 lines not on this page · raw message

crypto/tcrypt.c +19 -24

104 lines not on this page · raw message

crypto/tcrypt.h +42 -33

91 lines not on this page · raw message