Blame doc/text/archive_read_format.3.txt

Packit Service 1d0348
ARCHIVE_READ_FORMAT(3)	 BSD Library Functions Manual	ARCHIVE_READ_FORMAT(3)
Packit Service 1d0348
Packit Service 1d0348
NAME
Packit Service 1d0348
     archive_read_support_format_7zip, archive_read_support_format_all,
Packit Service 1d0348
     archive_read_support_format_ar, archive_read_support_format_by_code,
Packit Service 1d0348
     archive_read_support_format_cab, archive_read_support_format_cpio,
Packit Service 1d0348
     archive_read_support_format_empty, archive_read_support_format_iso9660,
Packit Service 1d0348
     archive_read_support_format_lha, archive_read_support_format_mtree,
Packit Service 1d0348
     archive_read_support_format_rar, archive_read_support_format_raw,
Packit Service 1d0348
     archive_read_support_format_tar, archive_read_support_format_xar,
Packit Service 1d0348
     archive_read_support_format_zip — functions for reading streaming ar‐
Packit Service 1d0348
     chives
Packit Service 1d0348
Packit Service 1d0348
LIBRARY
Packit Service 1d0348
     Streaming Archive Library (libarchive, -larchive)
Packit Service 1d0348
Packit Service 1d0348
SYNOPSIS
Packit Service 1d0348
     #include <archive.h>
Packit Service 1d0348
Packit Service 1d0348
     int
Packit Service 1d0348
     archive_read_support_format_7zip(struct archive *);
Packit Service 1d0348
Packit Service 1d0348
     int
Packit Service 1d0348
     archive_read_support_format_all(struct archive *);
Packit Service 1d0348
Packit Service 1d0348
     int
Packit Service 1d0348
     archive_read_support_format_ar(struct archive *);
Packit Service 1d0348
Packit Service 1d0348
     int
Packit Service 1d0348
     archive_read_support_format_by_code(struct archive *, int);
Packit Service 1d0348
Packit Service 1d0348
     int
Packit Service 1d0348
     archive_read_support_format_cab(struct archive *);
Packit Service 1d0348
Packit Service 1d0348
     int
Packit Service 1d0348
     archive_read_support_format_cpio(struct archive *);
Packit Service 1d0348
Packit Service 1d0348
     int
Packit Service 1d0348
     archive_read_support_format_empty(struct archive *);
Packit Service 1d0348
Packit Service 1d0348
     int
Packit Service 1d0348
     archive_read_support_format_iso9660(struct archive *);
Packit Service 1d0348
Packit Service 1d0348
     int
Packit Service 1d0348
     archive_read_support_format_lha(struct archive *);
Packit Service 1d0348
Packit Service 1d0348
     int
Packit Service 1d0348
     archive_read_support_format_mtree(struct archive *);
Packit Service 1d0348
Packit Service 1d0348
     int
Packit Service 1d0348
     archive_read_support_format_rar(struct archive *);
Packit Service 1d0348
Packit Service 1d0348
     int
Packit Service 1d0348
     archive_read_support_format_raw(struct archive *);
Packit Service 1d0348
Packit Service 1d0348
     int
Packit Service 1d0348
     archive_read_support_format_tar(struct archive *);
Packit Service 1d0348
Packit Service 1d0348
     int
Packit Service 1d0348
     archive_read_support_format_xar(struct archive *);
Packit Service 1d0348
Packit Service 1d0348
     int
Packit Service 1d0348
     archive_read_support_format_zip(struct archive *);
Packit Service 1d0348
Packit Service 1d0348
DESCRIPTION
Packit Service 1d0348
     archive_read_support_format_7zip(), archive_read_support_format_ar(),
Packit Service 1d0348
	     archive_read_support_format_cab(),
Packit Service 1d0348
	     archive_read_support_format_cpio(),
Packit Service 1d0348
	     archive_read_support_format_iso9660(),
Packit Service 1d0348
	     archive_read_support_format_lha(),
Packit Service 1d0348
	     archive_read_support_format_mtree(),
Packit Service 1d0348
	     archive_read_support_format_rar(),
Packit Service 1d0348
	     archive_read_support_format_raw(),
Packit Service 1d0348
	     archive_read_support_format_tar(),
Packit Service 1d0348
	     archive_read_support_format_xar(),
Packit Service 1d0348
	     archive_read_support_format_zip()
Packit Service 1d0348
	     Enables support---including auto-detection code---for the speci‐
Packit Service 1d0348
	     fied archive format.  For example,
Packit Service 1d0348
	     archive_read_support_format_tar() enables support for a variety
Packit Service 1d0348
	     of standard tar formats, old-style tar, ustar, pax interchange
Packit Service 1d0348
	     format, and many common variants.
Packit Service 1d0348
     archive_read_support_format_all()
Packit Service 1d0348
	     Enables support for all available formats except the “raw” format
Packit Service 1d0348
	     (see below).
Packit Service 1d0348
     archive_read_support_format_by_code()
Packit Service 1d0348
	     Enables a single format specified by the format code.  This can
Packit Service 1d0348
	     be useful when reading a single archive twice; use
Packit Service 1d0348
	     archive_format() after reading the first time and pass the
Packit Service 1d0348
	     resulting code to this function to selectively enable only the
Packit Service 1d0348
	     necessary format support.	Note:  In statically-linked executa‐
Packit Service 1d0348
	     bles, this will cause your program to include support for every
Packit Service 1d0348
	     format.  If executable size is a concern, you may wish to avoid
Packit Service 1d0348
	     using this function.
Packit Service 1d0348
     archive_read_support_format_empty()
Packit Service 1d0348
	     Enables support for treating empty files as empty archives.
Packit Service 1d0348
	     Because empty files are valid for several different formats, it
Packit Service 1d0348
	     is not possible to accurately determine a format for an empty
Packit Service 1d0348
	     file based purely on contents.  So empty files are treated by
Packit Service 1d0348
	     libarchive as a distinct format.
Packit Service 1d0348
     archive_read_support_format_raw()
Packit Service 1d0348
	     The “raw” format handler allows libarchive to be used to read
Packit Service 1d0348
	     arbitrary data.  It treats any data stream as an archive with a
Packit Service 1d0348
	     single entry.  The pathname of this entry is “data”; all other
Packit Service 1d0348
	     entry fields are unset.  This is not enabled by
Packit Service 1d0348
	     archive_read_support_format_all() in order to avoid erroneous
Packit Service 1d0348
	     handling of damaged archives.
Packit Service 1d0348
Packit Service 1d0348
RETURN VALUES
Packit Service 1d0348
     These functions return ARCHIVE_OK on success, or ARCHIVE_FATAL.
Packit Service 1d0348
Packit Service 1d0348
ERRORS
Packit Service 1d0348
     Detailed error codes and textual descriptions are available from the
Packit Service 1d0348
     archive_errno() and archive_error_string() functions.
Packit Service 1d0348
Packit Service 1d0348
SEE ALSO
Packit Service 1d0348
     tar(1), libarchive(3), archive_read_data(3), archive_read_filter(3),
Packit Service 1d0348
     archive_read_set_options(3), archive_util(3), tar(5)
Packit Service 1d0348
Packit Service 1d0348
BUGS
Packit Service 1d0348
     Many traditional archiver programs treat empty files as valid empty ar‐
Packit Service 1d0348
     chives.  For example, many implementations of tar(1) allow you to append
Packit Service 1d0348
     entries to an empty file.	Of course, it is impossible to determine the
Packit Service 1d0348
     format of an empty file by inspecting the contents, so this library
Packit Service 1d0348
     treats empty files as having a special “empty” format.
Packit Service 1d0348
Packit Service 1d0348
     Using the “raw” handler together with any other handler will often work
Packit Service 1d0348
     but can produce surprising results.
Packit Service 1d0348
Packit Service 1d0348
BSD			       February 2, 2012 			   BSD