1 ARCHIVE_READ_FORMAT(3) manual page
3 '''archive_read_support_format_7zip''',
4 '''archive_read_support_format_all''',
5 '''archive_read_support_format_ar''',
6 '''archive_read_support_format_by_code''',
7 '''archive_read_support_format_cab''',
8 '''archive_read_support_format_cpio''',
9 '''archive_read_support_format_empty''',
10 '''archive_read_support_format_iso9660''',
11 '''archive_read_support_format_lha''',
12 '''archive_read_support_format_mtree,'''
13 '''archive_read_support_format_rar,'''
14 '''archive_read_support_format_raw,'''
15 '''archive_read_support_format_tar''',
16 '''archive_read_support_format_xar''',
17 '''archive_read_support_format_zip'''
18 - functions for reading streaming archives
20 Streaming Archive Library (libarchive, -larchive)
22 '''<nowiki>#include <archive.h></nowiki>'''
26 '''archive_read_support_format_7zip'''(''struct archive *'');
30 '''archive_read_support_format_all'''(''struct archive *'');
34 '''archive_read_support_format_ar'''(''struct archive *'');
38 '''archive_read_support_format_by_code'''(''struct archive *'', ''int'');
42 '''archive_read_support_format_cab'''(''struct archive *'');
46 '''archive_read_support_format_cpio'''(''struct archive *'');
50 '''archive_read_support_format_empty'''(''struct archive *'');
54 '''archive_read_support_format_iso9660'''(''struct archive *'');
58 '''archive_read_support_format_lha'''(''struct archive *'');
62 '''archive_read_support_format_mtree'''(''struct archive *'');
66 '''archive_read_support_format_rar'''(''struct archive *'');
70 '''archive_read_support_format_raw'''(''struct archive *'');
74 '''archive_read_support_format_tar'''(''struct archive *'');
78 '''archive_read_support_format_xar'''(''struct archive *'');
82 '''archive_read_support_format_zip'''(''struct archive *'');
86 '''archive_read_support_format_7zip'''(),
87 '''archive_read_support_format_ar'''(),
88 '''archive_read_support_format_cab'''(),
89 '''archive_read_support_format_cpio'''(),
90 '''archive_read_support_format_iso9660'''(),
91 '''archive_read_support_format_lha'''(),
92 '''archive_read_support_format_mtree'''(),
93 '''archive_read_support_format_rar'''(),
94 '''archive_read_support_format_raw'''(),
95 '''archive_read_support_format_tar'''(),
96 '''archive_read_support_format_xar'''(),
97 '''archive_read_support_format_zip'''()
99 Enables support---including auto-detection code---for the
100 specified archive format.
102 '''archive_read_support_format_tar'''()
103 enables support for a variety of standard tar formats, old-style tar,
104 ustar, pax interchange format, and many common variants.
105 </dd><dt>'''archive_read_support_format_all'''()</dt><dd>
106 Enables support for all available formats except the
109 </dd><dt>'''archive_read_support_format_by_code'''()</dt><dd>
110 Enables a single format specified by the format code.
111 This can be useful when reading a single archive twice;
113 '''archive_format'''()
114 after reading the first time and pass the resulting code
115 to this function to selectively enable only the necessary
117 Note: In statically-linked executables, this will cause
118 your program to include support for every format.
119 If executable size is a concern, you may wish to avoid
121 </dd><dt>'''archive_read_support_format_empty'''()</dt><dd>
122 Enables support for treating empty files as empty archives.
123 Because empty files are valid for several different formats,
124 it is not possible to accurately determine a format for
125 an empty file based purely on contents.
126 So empty files are treated by libarchive as a distinct
128 </dd><dt>'''archive_read_support_format_raw'''()</dt><dd>
131 format handler allows libarchive to be used to read arbitrary data.
132 It treats any data stream as an archive with a single entry.
133 The pathname of this entry is
135 all other entry fields are unset.
136 This is not enabled by
137 '''archive_read_support_format_all'''()
138 in order to avoid erroneous handling of damaged archives.
141 These functions return
146 Detailed error codes and textual descriptions are available from the
147 '''archive_errno'''()
149 '''archive_error_string'''()
153 [[ManPageLibarchive3]],
154 [[ManPageArchiveReadData3]],
155 [[ManPageArchiveReadFilter3]],
156 [[ManPageArchiveReadSetOptions3]],
157 [[ManPageArchiveUtil3]],
160 Many traditional archiver programs treat
161 empty files as valid empty archives.
162 For example, many implementations of
164 allow you to append entries to an empty file.
165 Of course, it is impossible to determine the format of an empty file
166 by inspecting the contents, so this library treats empty files as
173 handler together with any other handler will often work
174 but can produce surprising results.