dpkg 1.22.7-3-g89f48
Loading...
Searching...
No Matches
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
49
59
66
67enum compressor_type compressor_find_by_name(const char *name);
69
70const char *compressor_get_name(enum compressor_type type);
71const char *compressor_get_extension(enum compressor_type type);
72
73enum compressor_strategy compressor_get_strategy(const char *name);
74
76 struct dpkg_error *err);
77
78void decompress_filter(struct compress_params *params, int fd_in, int fd_out,
79 const char *desc, ...)
81void compress_filter(struct compress_params *params, int fd_in, int fd_out,
82 const char *desc, ...)
84
88
89#endif /* LIBDPKG_COMPRESS_H */
enum compressor_type compressor_find_by_extension(const char *name)
Definition compress.c:1347
compressor_strategy
Definition compress.h:50
bool compressor_check_params(struct compress_params *params, struct dpkg_error *err)
Definition compress.c:1387
enum compressor_type compressor_find_by_name(const char *name)
Definition compress.c:1335
enum compressor_strategy compressor_get_strategy(const char *name)
Definition compress.c:1359
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:1419
void compress_filter(struct compress_params *params, int fd_in, int fd_out, const char *desc,...) DPKG_ATTR_PRINTF(4)
Definition compress.c:1435
const char * compressor_get_name(enum compressor_type type)
Definition compress.c:1323
const char * compressor_get_extension(enum compressor_type type)
Definition compress.c:1329
@ COMPRESSOR_STRATEGY_FILTERED
Definition compress.h:53
@ COMPRESSOR_STRATEGY_NONE
Definition compress.h:52
@ COMPRESSOR_STRATEGY_UNKNOWN
Definition compress.h:51
@ COMPRESSOR_STRATEGY_HUFFMAN
Definition compress.h:54
@ COMPRESSOR_STRATEGY_FIXED
Definition compress.h:56
@ COMPRESSOR_STRATEGY_EXTREME
Definition compress.h:57
@ COMPRESSOR_STRATEGY_RLE
Definition compress.h:55
@ COMPRESSOR_TYPE_GZIP
Definition compress.h:41
@ COMPRESSOR_TYPE_MAX
Definition compress.h:47
@ COMPRESSOR_TYPE_XZ
Definition compress.h:42
@ COMPRESSOR_TYPE_BZIP2
Definition compress.h:44
@ COMPRESSOR_TYPE_NONE
Definition compress.h:40
@ COMPRESSOR_TYPE_UNKNOWN
Definition compress.h:39
@ COMPRESSOR_TYPE_ZSTD
Definition compress.h:43
@ COMPRESSOR_TYPE_LZMA
Definition compress.h:45
#define DPKG_BEGIN_DECLS
Definition macros.h:164
#define DPKG_ATTR_PRINTF(n)
Definition macros.h:117
#define DPKG_END_DECLS
Definition macros.h:165
Definition compress.h:60
enum compressor_type type
Definition compress.h:61
int level
Definition compress.h:63
enum compressor_strategy strategy
Definition compress.h:62
int threads_max
Definition compress.h:64
Definition error.h:42