2 * Copyright (C) 2016 Jo-Philipp Wich <jo@mein.io>
4 * Zlib decrompression utility routines.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Library General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 struct gzip_handle
*gzip
;
31 struct sigaction pipe_sa
;
35 int gzip_exec(struct gzip_handle
*zh
, const char *filename
);
36 ssize_t
gzip_read(struct gzip_handle
*zh
, void *buf
, ssize_t len
);
37 ssize_t
gzip_copy(struct gzip_handle
*zh
, FILE * out
, ssize_t len
);
38 int gzip_close(struct gzip_handle
*zh
);
39 FILE *gzip_fdopen(struct gzip_handle
*zh
, const char *filename
);
41 #define gzip_seek(zh, len) gzip_copy(zh, NULL, len)