[POWERPC] zImage: Add more flexible gunzip convenience functions
[deliverable/linux.git] / arch / powerpc / boot / gunzip_util.h
1 /*
2 * Decompression convenience functions
3 *
4 * Copyright 2007 David Gibson, IBM Corporation.
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10 #ifndef _PPC_BOOT_GUNZIP_UTIL_H_
11 #define _PPC_BOOT_GUNZIP_UTIL_H_
12
13 #include "zlib.h"
14
15 /* scratch space for gunzip; 46912 is from zlib_inflate_workspacesize() */
16 #define GUNZIP_SCRATCH_SIZE 46912
17
18 struct gunzip_state {
19 z_stream s;
20 char scratch[46912];
21 };
22
23 void gunzip_start(struct gunzip_state *state, void *src, int srclen);
24 int gunzip_partial(struct gunzip_state *state, void *dst, int dstlen);
25 void gunzip_exactly(struct gunzip_state *state, void *dst, int len);
26 void gunzip_discard(struct gunzip_state *state, int len);
27 int gunzip_finish(struct gunzip_state *state, void *dst, int len);
28
29 #endif /* _PPC_BOOT_GUNZIP_UTIL_H_ */
30
This page took 0.031755 seconds and 6 git commands to generate.