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