xref: /rk3399_rockchip-uboot/fs/jffs2/compr_zlib.c (revision fe8c2806cdba70479e351299881a395dc2be7785)
1*fe8c2806Swdenk /*
2*fe8c2806Swdenk  * JFFS2 -- Journalling Flash File System, Version 2.
3*fe8c2806Swdenk  *
4*fe8c2806Swdenk  * Copyright (C) 2001 Red Hat, Inc.
5*fe8c2806Swdenk  *
6*fe8c2806Swdenk  * Created by David Woodhouse <dwmw2@cambridge.redhat.com>
7*fe8c2806Swdenk  *
8*fe8c2806Swdenk  * The original JFFS, from which the design for JFFS2 was derived,
9*fe8c2806Swdenk  * was designed and implemented by Axis Communications AB.
10*fe8c2806Swdenk  *
11*fe8c2806Swdenk  * The contents of this file are subject to the Red Hat eCos Public
12*fe8c2806Swdenk  * License Version 1.1 (the "Licence"); you may not use this file
13*fe8c2806Swdenk  * except in compliance with the Licence.  You may obtain a copy of
14*fe8c2806Swdenk  * the Licence at http://www.redhat.com/
15*fe8c2806Swdenk  *
16*fe8c2806Swdenk  * Software distributed under the Licence is distributed on an "AS IS"
17*fe8c2806Swdenk  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
18*fe8c2806Swdenk  * See the Licence for the specific language governing rights and
19*fe8c2806Swdenk  * limitations under the Licence.
20*fe8c2806Swdenk  *
21*fe8c2806Swdenk  * The Original Code is JFFS2 - Journalling Flash File System, version 2
22*fe8c2806Swdenk  *
23*fe8c2806Swdenk  * Alternatively, the contents of this file may be used under the
24*fe8c2806Swdenk  * terms of the GNU General Public License version 2 (the "GPL"), in
25*fe8c2806Swdenk  * which case the provisions of the GPL are applicable instead of the
26*fe8c2806Swdenk  * above.  If you wish to allow the use of your version of this file
27*fe8c2806Swdenk  * only under the terms of the GPL and not to allow others to use your
28*fe8c2806Swdenk  * version of this file under the RHEPL, indicate your decision by
29*fe8c2806Swdenk  * deleting the provisions above and replace them with the notice and
30*fe8c2806Swdenk  * other provisions required by the GPL.  If you do not delete the
31*fe8c2806Swdenk  * provisions above, a recipient may use your version of this file
32*fe8c2806Swdenk  * under either the RHEPL or the GPL.
33*fe8c2806Swdenk  *
34*fe8c2806Swdenk  * $Id: compr_zlib.c,v 1.2 2002/01/24 22:58:42 rfeany Exp $
35*fe8c2806Swdenk  *
36*fe8c2806Swdenk  */
37*fe8c2806Swdenk 
38*fe8c2806Swdenk #include <common.h>
39*fe8c2806Swdenk #include <config.h>
40*fe8c2806Swdenk #if (CONFIG_COMMANDS & CFG_CMD_JFFS2)
41*fe8c2806Swdenk 
42*fe8c2806Swdenk #include <jffs2/jffs2.h>
43*fe8c2806Swdenk #include <jffs2/mini_inflate.h>
44*fe8c2806Swdenk 
45*fe8c2806Swdenk long zlib_decompress(unsigned char *data_in, unsigned char *cpage_out,
46*fe8c2806Swdenk 		      __u32 srclen, __u32 destlen)
47*fe8c2806Swdenk {
48*fe8c2806Swdenk     return (decompress_block(cpage_out, data_in + 2, ldr_memcpy));
49*fe8c2806Swdenk 
50*fe8c2806Swdenk }
51*fe8c2806Swdenk 
52*fe8c2806Swdenk #endif /* CFG_CMD_JFFS2 */
53