From 20dde48bcadd856c86a91d5463831a10be46db83 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Thu, 19 Nov 2009 11:37:51 +0100 Subject: add lzop decompression support Add lzop decompression support to the existing lzo bitstream handling (think gzip versus zlib), and support it for uImage decompression if CONFIG_LZO is enabled. Lzop doesn't compress as good as gzip (~10% worse), but decompression is very fast (~0.7s faster here on a slow ppc). The lzop decompression code is based on Albin Tonnerre's recent ARM Linux lzo support patch. Cc: albin.tonnerre@free-electrons.com Signed-off-by: Peter Korsgaard --- include/image.h | 1 + include/linux/lzo.h | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'include') diff --git a/include/image.h b/include/image.h index 5a424e6a94..cc38eae39a 100644 --- a/include/image.h +++ b/include/image.h @@ -164,6 +164,7 @@ #define IH_COMP_GZIP 1 /* gzip Compression Used */ #define IH_COMP_BZIP2 2 /* bzip2 Compression Used */ #define IH_COMP_LZMA 3 /* lzma Compression Used */ +#define IH_COMP_LZO 4 /* lzo Compression Used */ #define IH_MAGIC 0x27051956 /* Image Magic Number */ #define IH_NMLEN 32 /* Image Name Length */ diff --git a/include/linux/lzo.h b/include/linux/lzo.h index d793497ec1..88687faba1 100644 --- a/include/linux/lzo.h +++ b/include/linux/lzo.h @@ -27,6 +27,10 @@ int lzo1x_1_compress(const unsigned char *src, size_t src_len, int lzo1x_decompress_safe(const unsigned char *src, size_t src_len, unsigned char *dst, size_t *dst_len); +/* decompress lzop format */ +int lzop_decompress(const unsigned char *src, size_t src_len, + unsigned char *dst, size_t *dst_len); + /* * Return values (< 0 = Error) */ -- cgit v1.2.1