dpkg 1.21.11
compress.h
Go to the documentation of this file.
1/*
2 * libdpkg - Debian packaging suite library routines
3 * compress.h - compression support functions
4 *
5 * Copyright © 2004 Scott James Remnant <scott@netsplit.com>
6 * Copyright © 2006-2014 Guillem Jover <guillem@debian.org>
7 *
8 * This is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22#ifndef LIBDPKG_COMPRESS_H
23#define LIBDPKG_COMPRESS_H
24
25#include <dpkg/macros.h>
26#include <dpkg/error.h>
27
28#include <stdbool.h>
29
31
45};
46
55};
56
60 int level;
62};
63
64enum compressor_type compressor_find_by_name(const char *name);
66
67const char *compressor_get_name(enum compressor_type type);
68const char *compressor_get_extension(enum compressor_type type);
69
70enum compressor_strategy compressor_get_strategy(const char *name);
71
73 struct dpkg_error *err);
74
75void decompress_filter(struct compress_params *params, int fd_in, int fd_out,
76 const char *desc, ...)
78void compress_filter(struct compress_params *params, int fd_in, int fd_out,
79 const char *desc, ...)
81
85
86#endif /* LIBDPKG_COMPRESS_H */
enum compressor_type compressor_find_by_extension(const char *name)
Definition: compress.c:946
compressor_strategy
Definition: compress.h:47
bool compressor_check_params(struct compress_params *params, struct dpkg_error *err)
Definition: compress.c:986
enum compressor_type compressor_find_by_name(const char *name)
Definition: compress.c:934
enum compressor_strategy compressor_get_strategy(const char *name)
Definition: compress.c:958
compressor_type
Definition: compress.h:38
void decompress_filter(struct compress_params *params, int fd_in, int fd_out, const char *desc,...) DPKG_ATTR_PRINTF(4)
Definition: compress.c:1009
void compress_filter(struct compress_params *params, int fd_in, int fd_out, const char *desc,...) DPKG_ATTR_PRINTF(4)
Definition: compress.c:1025
const char * compressor_get_name(enum compressor_type type)
Definition: compress.c:922
const char * compressor_get_extension(enum compressor_type type)
Definition: compress.c:928
@ COMPRESSOR_STRATEGY_FILTERED
Definition: compress.h:50
@ COMPRESSOR_STRATEGY_NONE
Definition: compress.h:49
@ COMPRESSOR_STRATEGY_UNKNOWN
Definition: compress.h:48
@ COMPRESSOR_STRATEGY_HUFFMAN
Definition: compress.h:51
@ COMPRESSOR_STRATEGY_FIXED
Definition: compress.h:53
@ COMPRESSOR_STRATEGY_EXTREME
Definition: compress.h:54
@ COMPRESSOR_STRATEGY_RLE
Definition: compress.h:52
@ COMPRESSOR_TYPE_GZIP
Definition: compress.h:41
@ COMPRESSOR_TYPE_XZ
Definition: compress.h:42
@ COMPRESSOR_TYPE_BZIP2
Definition: compress.h:43
@ COMPRESSOR_TYPE_NONE
Definition: compress.h:40
@ COMPRESSOR_TYPE_UNKNOWN
Definition: compress.h:39
@ COMPRESSOR_TYPE_LZMA
Definition: compress.h:44
#define DPKG_BEGIN_DECLS
Definition: macros.h:86
#define DPKG_ATTR_PRINTF(n)
Definition: macros.h:56
#define DPKG_END_DECLS
Definition: macros.h:87
Definition: compress.h:57
enum compressor_type type
Definition: compress.h:58
int level
Definition: compress.h:60
enum compressor_strategy strategy
Definition: compress.h:59
int threads_max
Definition: compress.h:61
Definition: error.h:42