]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - contrib/libarchive/libarchive/archive_read_filter.3
MFC r299529,r299540,r299576,r299896:
[FreeBSD/stable/10.git] / contrib / libarchive / libarchive / archive_read_filter.3
1 .\" Copyright (c) 2003-2011 Tim Kientzle
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD$
26 .\"
27 .Dd August 14, 2014
28 .Dt ARCHIVE_READ_FILTER 3
29 .Os
30 .Sh NAME
31 .Nm archive_read_support_filter_all ,
32 .Nm archive_read_support_filter_bzip2 ,
33 .Nm archive_read_support_filter_compress ,
34 .Nm archive_read_support_filter_gzip ,
35 .Nm archive_read_support_filter_lz4 ,
36 .Nm archive_read_support_filter_lzma ,
37 .Nm archive_read_support_filter_none ,
38 .Nm archive_read_support_filter_rpm ,
39 .Nm archive_read_support_filter_uu ,
40 .Nm archive_read_support_filter_xz ,
41 .Nm archive_read_support_filter_program ,
42 .Nm archive_read_support_filter_program_signature
43 .Nd functions for reading streaming archives
44 .\"
45 .Sh LIBRARY
46 Streaming Archive Library (libarchive, -larchive)
47 .Sh SYNOPSIS
48 .In archive.h
49 .Ft int
50 .Fn archive_read_support_filter_all "struct archive *"
51 .Ft int
52 .Fn archive_read_support_filter_bzip2 "struct archive *"
53 .Ft int
54 .Fn archive_read_support_filter_compress "struct archive *"
55 .Ft int
56 .Fn archive_read_support_filter_grzip "struct archive *"
57 .Ft int
58 .Fn archive_read_support_filter_gzip "struct archive *"
59 .Ft int
60 .Fn archive_read_support_filter_lrzip "struct archive *"
61 .Ft int
62 .Fn archive_read_support_filter_lz4 "struct archive *"
63 .Ft int
64 .Fn archive_read_support_filter_lzma "struct archive *"
65 .Ft int
66 .Fn archive_read_support_filter_lzop "struct archive *"
67 .Ft int
68 .Fn archive_read_support_filter_none "struct archive *"
69 .Ft int
70 .Fn archive_read_support_filter_rpm "struct archive *"
71 .Ft int
72 .Fn archive_read_support_filter_uu "struct archive *"
73 .Ft int
74 .Fn archive_read_support_filter_xz "struct archive *"
75 .Ft int
76 .Fo archive_read_support_filter_program
77 .Fa "struct archive *"
78 .Fa "const char *cmd"
79 .Fc
80 .Ft int
81 .Fo archive_read_support_filter_program_signature
82 .Fa "struct archive *"
83 .Fa "const char *cmd"
84 .Fa "const void *signature"
85 .Fa "size_t signature_length"
86 .Fc
87 .\"
88 .Sh DESCRIPTION
89 .Bl -tag -compact -width indent
90 .It Xo
91 .Fn archive_read_support_filter_bzip2 ,
92 .Fn archive_read_support_filter_compress ,
93 .Fn archive_read_support_filter_grzip ,
94 .Fn archive_read_support_filter_gzip ,
95 .Fn archive_read_support_filter_lrzip ,
96 .Fn archive_read_support_filter_lz4 ,
97 .Fn archive_read_support_filter_lzma ,
98 .Fn archive_read_support_filter_lzop ,
99 .Fn archive_read_support_filter_none ,
100 .Fn archive_read_support_filter_rpm ,
101 .Fn archive_read_support_filter_uu ,
102 .Fn archive_read_support_filter_xz
103 .Xc
104 Enables auto-detection code and decompression support for the
105 specified compression.
106 These functions may fall back on external programs if an appropriate
107 library was not available at build time.
108 Decompression using an external program is usually slower than
109 decompression through built-in libraries.
110 Note that
111 .Dq none
112 is always enabled by default.
113 .It Fn archive_read_support_filter_all
114 Enables all available decompression filters.
115 .It Fn archive_read_support_filter_program
116 Data is fed through the specified external program before being dearchived.
117 Note that this disables automatic detection of the compression format,
118 so it makes no sense to specify this in conjunction with any other
119 decompression option.
120 .It Fn archive_read_support_filter_program_signature
121 This feeds data through the specified external program
122 but only if the initial bytes of the data match the specified
123 signature value.
124 .El
125 .\"
126 .\". Sh EXAMPLE
127 .\"
128 .Sh RETURN VALUES
129 These functions return
130 .Cm ARCHIVE_OK
131 if the compression is fully supported,
132 .Cm ARCHIVE_WARN
133 if the compression is supported only through an external program.
134 .Pp
135 .Fn archive_read_support_filter_none
136 always succeeds.
137 .\"
138 .Sh ERRORS
139 Detailed error codes and textual descriptions are available from the
140 .Fn archive_errno
141 and
142 .Fn archive_error_string
143 functions.
144 .\"
145 .Sh SEE ALSO
146 .Xr libarchive 3 ,
147 .Xr archive_read 3 ,
148 .Xr archive_read_data 3 ,
149 .Xr archive_read_format 3 ,
150 .Xr archive_read_format 3