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