proc tty: switch synclinkmp to ->proc_fops
[firewire-audio.git] / include / linux / decompress / generic.h
blob6dfb856327bbe714300ae004cba6787d59d961d0
1 #ifndef DECOMPRESS_GENERIC_H
2 #define DECOMPRESS_GENERIC_H
4 /* Minimal chunksize to be read.
5 *Bzip2 prefers at least 4096
6 *Lzma prefers 0x10000 */
7 #define COMPR_IOBUF_SIZE 4096
9 typedef int (*decompress_fn) (unsigned char *inbuf, int len,
10 int(*fill)(void*, unsigned int),
11 int(*writebb)(void*, unsigned int),
12 unsigned char *output,
13 int *posp,
14 void(*error)(char *x));
16 /* inbuf - input buffer
17 *len - len of pre-read data in inbuf
18 *fill - function to fill inbuf if empty
19 *writebb - function to write out outbug
20 *posp - if non-null, input position (number of bytes read) will be
21 * returned here
23 *If len != 0, the inbuf is initialized (with as much data), and fill
24 *should not be called
25 *If len = 0, the inbuf is allocated, but empty. Its size is IOBUF_SIZE
26 *fill should be called (repeatedly...) to read data, at most IOBUF_SIZE
29 /* Utility routine to detect the decompression method */
30 decompress_fn decompress_method(const unsigned char *inbuf, int len,
31 const char **name);
33 #endif