]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/libarchive/libarchive/archive_read_filter.3
Upgrade our copy of llvm/clang to r155985, from upstream's release_31
[FreeBSD/FreeBSD.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 March 19, 2011
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_lzma ,
36 .Nm archive_read_support_filter_none ,
37 .Nm archive_read_support_filter_xz ,
38 .Nm archive_read_support_filter_program ,
39 .Nm archive_read_support_filter_program_signature
40 .Nd functions for reading streaming archives
41 .\"
42 .Sh SYNOPSIS
43 .In archive.h
44 .Ft int
45 .Fn archive_read_support_filter_all "struct archive *"
46 .Ft int
47 .Fn archive_read_support_filter_bzip2 "struct archive *"
48 .Ft int
49 .Fn archive_read_support_filter_compress "struct archive *"
50 .Ft int
51 .Fn archive_read_support_filter_gzip "struct archive *"
52 .Ft int
53 .Fn archive_read_support_filter_lzma "struct archive *"
54 .Ft int
55 .Fn archive_read_support_filter_none "struct archive *"
56 .Ft int
57 .Fn archive_read_support_filter_xz "struct archive *"
58 .Ft int
59 .Fo archive_read_support_filter_program
60 .Fa "struct archive *"
61 .Fa "const char *cmd"
62 .Fc
63 .Ft int
64 .Fo archive_read_support_filter_program_signature
65 .Fa "struct archive *"
66 .Fa "const char *cmd"
67 .Fa "const void *signature"
68 .Fa "size_t signature_length"
69 .Fc
70 .\"
71 .Sh DESCRIPTION
72 .Bl -tag -compact -width indent
73 .It Xo
74 .Fn archive_read_support_filter_bzip2 ,
75 .Fn archive_read_support_filter_compress ,
76 .Fn archive_read_support_filter_gzip ,
77 .Fn archive_read_support_filter_lzma ,
78 .Fn archive_read_support_filter_none ,
79 .Fn archive_read_support_filter_xz
80 .Xc
81 Enables auto-detection code and decompression support for the
82 specified compression.
83 These functions may fall back on external programs if an appropriate
84 library was not available at build time.
85 Decompression using an external program is usually slower than
86 decompression through built-in libraries.
87 Note that
88 .Dq none
89 is always enabled by default.
90 .It Fn archive_read_support_filter_all
91 Enables all available decompression filters.
92 .It Fn archive_read_support_filter_program
93 Data is fed through the specified external program before being dearchived.
94 Note that this disables automatic detection of the compression format,
95 so it makes no sense to specify this in conjunction with any other
96 decompression option.
97 .It Fn archive_read_support_filter_program_signature
98 This feeds data through the specified external program
99 but only if the initial bytes of the data match the specified
100 signature value.
101 .El
102 .\"
103 .\". Sh EXAMPLE
104 .\"
105 .Sh RETURN VALUES
106 These functions return
107 .Cm ARCHIVE_OK
108 if the compression is fully supported,
109 .Cm ARCHIVE_WARN
110 if the compression is supported only through an external program.
111 .Pp
112 .Fn archive_read_support_filter_none
113 always succeeds.
114 .\"
115 .Sh ERRORS
116 Detailed error codes and textual descriptions are available from the
117 .Fn archive_errno
118 and
119 .Fn archive_error_string
120 functions.
121 .\"
122 .Sh SEE ALSO
123 .Xr libarchive 3 ,
124 .Xr archive_read 3 ,
125 .Xr archive_read_data 3 ,
126 .Xr archive_read_format 3 ,
127 .Xr archive_read_format 3