1<!-- Creator     : groff version 1.22.4 -->
2<!-- CreationDate: Sun Aug 22 23:03:26 2021 -->
3<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
4"http://www.w3.org/TR/html4/loose.dtd">
5<html>
6<head>
7<meta name="generator" content="groff -Thtml, see www.gnu.org">
8<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
9<meta name="Content-Style" content="text/css">
10<style type="text/css">
11       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
12       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
13       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
14       h1      { text-align: center }
15</style>
16<title></title>
17</head>
18<body>
19
20<hr>
21
22
23<p>ARCHIVE_READ_FORMAT(3) BSD Library Functions Manual
24ARCHIVE_READ_FORMAT(3)</p>
25
26<p style="margin-top: 1em"><b>NAME</b></p>
27
28
29<p style="margin-left:6%;"><b>archive_read_support_format_7zip</b>,
30<b>archive_read_support_format_all</b>,
31<b>archive_read_support_format_ar</b>,
32<b>archive_read_support_format_by_code</b>,
33<b>archive_read_support_format_cab</b>,
34<b>archive_read_support_format_cpio</b>,
35<b>archive_read_support_format_empty</b>,
36<b>archive_read_support_format_iso9660</b>,
37<b>archive_read_support_format_lha</b>,
38<b>archive_read_support_format_mtree</b>,
39<b>archive_read_support_format_rar</b>,
40<b>archive_read_support_format_raw</b>,
41<b>archive_read_support_format_tar</b>,
42<b>archive_read_support_format_xar</b>,
43<b>archive_read_support_format_zip</b> &mdash; functions for
44reading streaming archives</p>
45
46<p style="margin-top: 1em"><b>LIBRARY</b></p>
47
48<p style="margin-left:6%;">Streaming Archive Library
49(libarchive, -larchive)</p>
50
51<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
52
53<p style="margin-left:6%;"><b>#include
54&lt;archive.h&gt;</b></p>
55
56<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
57
58
59<p style="margin-left:12%;"><b>archive_read_support_format_7zip</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
60
61<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
62
63
64<p style="margin-left:12%;"><b>archive_read_support_format_all</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
65
66<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
67
68
69<p style="margin-left:12%;"><b>archive_read_support_format_ar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
70
71<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
72
73
74<p style="margin-left:12%;"><b>archive_read_support_format_by_code</b>(<i>struct&nbsp;archive&nbsp;*</i>,
75<i>int</i>);</p>
76
77<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
78
79
80<p style="margin-left:12%;"><b>archive_read_support_format_cab</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
81
82<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
83
84
85<p style="margin-left:12%;"><b>archive_read_support_format_cpio</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
86
87<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
88
89
90<p style="margin-left:12%;"><b>archive_read_support_format_empty</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
91
92<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
93
94
95<p style="margin-left:12%;"><b>archive_read_support_format_iso9660</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
96
97<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
98
99
100<p style="margin-left:12%;"><b>archive_read_support_format_lha</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
101
102<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
103
104
105<p style="margin-left:12%;"><b>archive_read_support_format_mtree</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
106
107<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
108
109
110<p style="margin-left:12%;"><b>archive_read_support_format_rar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
111
112<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
113
114
115<p style="margin-left:12%;"><b>archive_read_support_format_raw</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
116
117<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
118
119
120<p style="margin-left:12%;"><b>archive_read_support_format_tar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
121
122<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
123
124
125<p style="margin-left:12%;"><b>archive_read_support_format_xar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
126
127<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
128
129
130<p style="margin-left:12%;"><b>archive_read_support_format_zip</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
131
132<p style="margin-top: 1em"><b>DESCRIPTION <br>
133archive_read_support_format_7zip</b>(),
134<b>archive_read_support_format_ar</b>(),
135<b>archive_read_support_format_cab</b>(),
136<b>archive_read_support_format_cpio</b>(),
137<b>archive_read_support_format_iso9660</b>(),
138<b>archive_read_support_format_lha</b>(),
139<b>archive_read_support_format_mtree</b>(),
140<b>archive_read_support_format_rar</b>(),
141<b>archive_read_support_format_raw</b>(),
142<b>archive_read_support_format_tar</b>(),
143<b>archive_read_support_format_xar</b>(),
144<b>archive_read_support_format_zip</b>()</p>
145
146<p style="margin-left:17%;">Enables support---including
147auto-detection code---for the specified archive format. For
148example, <b>archive_read_support_format_tar</b>() enables
149support for a variety of standard tar formats, old-style
150tar, ustar, pax interchange format, and many common
151variants.</p>
152
153<p><b>archive_read_support_format_all</b>()</p>
154
155<p style="margin-left:17%;">Enables support for all
156available formats except the &ldquo;raw&rdquo; format (see
157below).</p>
158
159<p><b>archive_read_support_format_by_code</b>()</p>
160
161<p style="margin-left:17%;">Enables a single format
162specified by the format code. This can be useful when
163reading a single archive twice; use <b>archive_format</b>()
164after reading the first time and pass the resulting code to
165this function to selectively enable only the necessary
166format support. Note: In statically-linked executables, this
167will cause your program to include support for every format.
168If executable size is a concern, you may wish to avoid using
169this function.</p>
170
171<p><b>archive_read_support_format_empty</b>()</p>
172
173<p style="margin-left:17%;">Enables support for treating
174empty files as empty archives. Because empty files are valid
175for several different formats, it is not possible to
176accurately determine a format for an empty file based purely
177on contents. So empty files are treated by libarchive as a
178distinct format.</p>
179
180<p><b>archive_read_support_format_raw</b>()</p>
181
182<p style="margin-left:17%;">The &ldquo;raw&rdquo; format
183handler allows libarchive to be used to read arbitrary data.
184It treats any data stream as an archive with a single entry.
185The pathname of this entry is &ldquo;data&rdquo;; all other
186entry fields are unset. This is not enabled by
187<b>archive_read_support_format_all</b>() in order to avoid
188erroneous handling of damaged archives.</p>
189
190<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
191
192<p style="margin-left:6%;">These functions return
193<b>ARCHIVE_OK</b> on success, or <b>ARCHIVE_FATAL</b>.</p>
194
195<p style="margin-top: 1em"><b>ERRORS</b></p>
196
197<p style="margin-left:6%;">Detailed error codes and textual
198descriptions are available from the <b>archive_errno</b>()
199and <b>archive_error_string</b>() functions.</p>
200
201<p style="margin-top: 1em"><b>SEE ALSO</b></p>
202
203<p style="margin-left:6%;">tar(1), archive_read_data(3),
204archive_read_filter(3), archive_read_set_options(3),
205archive_util(3), libarchive(3), tar(5)</p>
206
207<p style="margin-top: 1em"><b>BUGS</b></p>
208
209<p style="margin-left:6%;">Many traditional archiver
210programs treat empty files as valid empty archives. For
211example, many implementations of tar(1) allow you to append
212entries to an empty file. Of course, it is impossible to
213determine the format of an empty file by inspecting the
214contents, so this library treats empty files as having a
215special &ldquo;empty&rdquo; format.</p>
216
217<p style="margin-left:6%; margin-top: 1em">Using the
218&ldquo;raw&rdquo; handler together with any other handler
219will often work but can produce surprising results.</p>
220
221<p style="margin-left:6%; margin-top: 1em">BSD
222February&nbsp;2, 2012 BSD</p>
223<hr>
224</body>
225</html>
226