Blame libarchive/archive_write_set_options.3

Packit Service 1d0348
.\" Copyright (c) 2003-2010 Tim Kientzle
Packit Service 1d0348
.\" All rights reserved.
Packit Service 1d0348
.\"
Packit Service 1d0348
.\" Redistribution and use in source and binary forms, with or without
Packit Service 1d0348
.\" modification, are permitted provided that the following conditions
Packit Service 1d0348
.\" are met:
Packit Service 1d0348
.\" 1. Redistributions of source code must retain the above copyright
Packit Service 1d0348
.\"    notice, this list of conditions and the following disclaimer.
Packit Service 1d0348
.\" 2. Redistributions in binary form must reproduce the above copyright
Packit Service 1d0348
.\"    notice, this list of conditions and the following disclaimer in the
Packit Service 1d0348
.\"    documentation and/or other materials provided with the distribution.
Packit Service 1d0348
.\"
Packit Service 1d0348
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
Packit Service 1d0348
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Packit Service 1d0348
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Packit Service 1d0348
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
Packit Service 1d0348
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Packit Service 1d0348
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
Packit Service 1d0348
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
Packit Service 1d0348
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
Packit Service 1d0348
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
Packit Service 1d0348
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
Packit Service 1d0348
.\" SUCH DAMAGE.
Packit Service 1d0348
.\"
Packit Service 1d0348
.\" $FreeBSD$
Packit Service 1d0348
.\"
Packit Service 1d0348
.Dd February 2, 2012
Packit Service 1d0348
.Dt ARCHIVE_WRITE_OPTIONS 3
Packit Service 1d0348
.Os
Packit Service 1d0348
.Sh NAME
Packit Service 1d0348
.Nm archive_write_set_filter_option ,
Packit Service 1d0348
.Nm archive_write_set_format_option ,
Packit Service 1d0348
.Nm archive_write_set_option ,
Packit Service 1d0348
.Nm archive_write_set_options
Packit Service 1d0348
.Nd functions controlling options for writing archives
Packit Service 1d0348
.Sh LIBRARY
Packit Service 1d0348
Streaming Archive Library (libarchive, -larchive)
Packit Service 1d0348
.Sh SYNOPSIS
Packit Service 1d0348
.Ft int
Packit Service 1d0348
.Fo archive_write_set_filter_option
Packit Service 1d0348
.Fa "struct archive *"
Packit Service 1d0348
.Fa "const char *module"
Packit Service 1d0348
.Fa "const char *option"
Packit Service 1d0348
.Fa "const char *value"
Packit Service 1d0348
.Fc
Packit Service 1d0348
.Ft int
Packit Service 1d0348
.Fo archive_write_set_format_option
Packit Service 1d0348
.Fa "struct archive *"
Packit Service 1d0348
.Fa "const char *module"
Packit Service 1d0348
.Fa "const char *option"
Packit Service 1d0348
.Fa "const char *value"
Packit Service 1d0348
.Fc
Packit Service 1d0348
.Ft int
Packit Service 1d0348
.Fo archive_write_set_option
Packit Service 1d0348
.Fa "struct archive *"
Packit Service 1d0348
.Fa "const char *module"
Packit Service 1d0348
.Fa "const char *option"
Packit Service 1d0348
.Fa "const char *value"
Packit Service 1d0348
.Fc
Packit Service 1d0348
.Ft int
Packit Service 1d0348
.Fo archive_write_set_options
Packit Service 1d0348
.Fa "struct archive *"
Packit Service 1d0348
.Fa "const char *options"
Packit Service 1d0348
.Fc
Packit Service 1d0348
.Sh DESCRIPTION
Packit Service 1d0348
These functions provide a way for libarchive clients to configure
Packit Service 1d0348
specific write modules.
Packit Service 1d0348
.Bl -tag -width indent
Packit Service 1d0348
.It Xo
Packit Service 1d0348
.Fn archive_write_set_filter_option ,
Packit Service 1d0348
.Fn archive_write_set_format_option
Packit Service 1d0348
.Xc
Packit Service 1d0348
Specifies an option that will be passed to currently-registered
Packit Service 1d0348
filters (including decompression filters) or format readers.
Packit Service 1d0348
.Pp
Packit Service 1d0348
If
Packit Service 1d0348
.Ar option
Packit Service 1d0348
and
Packit Service 1d0348
.Ar value
Packit Service 1d0348
are both
Packit Service 1d0348
.Dv NULL ,
Packit Service 1d0348
these functions will do nothing and
Packit Service 1d0348
.Cm ARCHIVE_OK
Packit Service 1d0348
will be returned.
Packit Service 1d0348
If
Packit Service 1d0348
.Ar option
Packit Service 1d0348
is
Packit Service 1d0348
.Dv NULL
Packit Service 1d0348
but
Packit Service 1d0348
.Ar value
Packit Service 1d0348
is not, these functions will do nothing and
Packit Service 1d0348
.Cm ARCHIVE_FAILED
Packit Service 1d0348
will be returned.
Packit Service 1d0348
.Pp
Packit Service 1d0348
If
Packit Service 1d0348
.Ar module
Packit Service 1d0348
is not
Packit Service 1d0348
.Dv NULL ,
Packit Service 1d0348
.Ar option
Packit Service 1d0348
and
Packit Service 1d0348
.Ar value
Packit Service 1d0348
will be provided to the filter or reader named
Packit Service 1d0348
.Ar module .
Packit Service 1d0348
The return value will be either
Packit Service 1d0348
.Cm ARCHIVE_OK
Packit Service 1d0348
if the option was successfully handled or
Packit Service 1d0348
.Cm ARCHIVE_WARN
Packit Service 1d0348
if the option was unrecognized by the module or could otherwise
Packit Service 1d0348
not be handled.
Packit Service 1d0348
If there is no such module,
Packit Service 1d0348
.Cm ARCHIVE_FAILED
Packit Service 1d0348
will be returned.
Packit Service 1d0348
.Pp
Packit Service 1d0348
If
Packit Service 1d0348
.Ar module
Packit Service 1d0348
is
Packit Service 1d0348
.Dv NULL ,
Packit Service 1d0348
.Ar option
Packit Service 1d0348
and
Packit Service 1d0348
.Ar value
Packit Service 1d0348
will be provided to every registered module.
Packit Service 1d0348
If any module returns
Packit Service 1d0348
.Cm ARCHIVE_FATAL ,
Packit Service 1d0348
this value will be returned immediately.
Packit Service 1d0348
Otherwise,
Packit Service 1d0348
.Cm ARCHIVE_OK
Packit Service 1d0348
will be returned if any module accepts the option, and
Packit Service 1d0348
.Cm ARCHIVE_FAILED
Packit Service 1d0348
in all other cases.
Packit Service 1d0348
.\"
Packit Service 1d0348
.It Fn archive_write_set_option
Packit Service 1d0348
Calls
Packit Service 1d0348
.Fn archive_write_set_format_option ,
Packit Service 1d0348
then
Packit Service 1d0348
.Fn archive_write_set_filter_option .
Packit Service 1d0348
If either function returns
Packit Service 1d0348
.Cm ARCHIVE_FATAL ,
Packit Service 1d0348
.Cm ARCHIVE_FATAL
Packit Service 1d0348
will be returned
Packit Service 1d0348
immediately.
Packit Service 1d0348
Otherwise, greater of the two values will be returned.
Packit Service 1d0348
.\"
Packit Service 1d0348
.It Fn archive_write_set_options
Packit Service 1d0348
.Ar options
Packit Service 1d0348
is a comma-separated list of options.
Packit Service 1d0348
If
Packit Service 1d0348
.Ar options
Packit Service 1d0348
is
Packit Service 1d0348
.Dv NULL
Packit Service 1d0348
or empty,
Packit Service 1d0348
.Cm ARCHIVE_OK
Packit Service 1d0348
will be returned immediately.
Packit Service 1d0348
.Pp
Packit Service 1d0348
Individual options have one of the following forms:
Packit Service 1d0348
.Bl -tag -compact -width indent
Packit Service 1d0348
.It Ar option=value
Packit Service 1d0348
The option/value pair will be provided to every module.
Packit Service 1d0348
Modules that do not accept an option with this name will ignore it.
Packit Service 1d0348
.It Ar option
Packit Service 1d0348
The option will be provided to every module with a value of
Packit Service 1d0348
.Dq 1 .
Packit Service 1d0348
.It Ar !option
Packit Service 1d0348
The option will be provided to every module with a NULL value.
Packit Service 1d0348
.It Ar module:option=value , Ar module:option , Ar module:!option
Packit Service 1d0348
As above, but the corresponding option and value will be provided
Packit Service 1d0348
only to modules whose name matches
Packit Service 1d0348
.Ar module .
Packit Service 1d0348
.El
Packit Service 1d0348
.El
Packit Service 1d0348
.\"
Packit Service 1d0348
.Sh OPTIONS
Packit Service 1d0348
.Bl -tag -compact -width indent
Packit Service 1d0348
.It Filter gzip
Packit Service 1d0348
.Bl -tag -compact -width indent
Packit Service 1d0348
.It Cm compression-level
Packit Service 1d0348
The value is interpreted as a decimal integer specifying the
Packit Service 1d0348
gzip compression level.
Packit Service 1d0348
.El
Packit Service 1d0348
.It Filter xz
Packit Service 1d0348
.Bl -tag -compact -width indent
Packit Service 1d0348
.It Cm compression-level
Packit Service 1d0348
The value is interpreted as a decimal integer specifying the
Packit Service 1d0348
compression level.
Packit Service 1d0348
.El
Packit Service 1d0348
.It Format mtree
Packit Service 1d0348
.Bl -tag -compact -width indent
Packit Service 1d0348
.It Cm cksum , Cm device , Cm flags , Cm gid , Cm gname , Cm indent , Cm link , Cm md5 , Cm mode , Cm nlink , Cm rmd160 , Cm sha1 , Cm sha256 , Cm sha384 , Cm sha512 , Cm size , Cm time , Cm uid , Cm uname
Packit Service 1d0348
Enable a particular keyword in the mtree output.
Packit Service 1d0348
Prefix with an exclamation mark to disable the corresponding keyword.
Packit Service 1d0348
The default is equivalent to
Packit Service 1d0348
.Dq device, flags, gid, gname, link, mode, nlink, size, time, type, uid, uname .
Packit Service 1d0348
.It Cm all
Packit Service 1d0348
Enables all of the above keywords.
Packit Service 1d0348
.It Cm use-set
Packit Service 1d0348
Enables generation of
Packit Service 1d0348
.Cm /set
Packit Service 1d0348
lines that specify default values for the following files and/or directories.
Packit Service 1d0348
.It Cm indent
Packit Service 1d0348
XXX needs explanation XXX
Packit Service 1d0348
.El
Packit Service 1d0348
.It Format iso9660 - volume metadata
Packit Service 1d0348
These options are used to set standard ISO9660 metadata.
Packit Service 1d0348
.Bl -tag -compact -width indent
Packit Service 1d0348
.It Cm abstract-file Ns = Ns Ar filename
Packit Service 1d0348
The file with the specified name will be identified in the ISO9660 metadata
Packit Service 1d0348
as holding the abstract for this volume.  Default: none.
Packit Service 1d0348
.It Cm application-id Ns = Ns Ar filename
Packit Service 1d0348
The file with the specified name will be identified in the ISO9660 metadata
Packit Service 1d0348
as holding the application identifier for this volume.  Default: none.
Packit Service 1d0348
.It Cm biblio-file Ns = Ns Ar filename
Packit Service 1d0348
The file with the specified name will be identified in the ISO9660 metadata
Packit Service 1d0348
as holding the bibliography for this volume.  Default: none.
Packit Service 1d0348
.It Cm copyright-file Ns = Ns Ar filename
Packit Service 1d0348
The file with the specified name will be identified in the ISO9660 metadata
Packit Service 1d0348
as holding the copyright for this volume.  Default: none.
Packit Service 1d0348
.It Cm publisher Ns = Ns Ar filename
Packit Service 1d0348
The file with the specified name will be identified in the ISO9660 metadata
Packit Service 1d0348
as holding the publisher information for this volume.  Default: none.
Packit Service 1d0348
.It Cm volume-id Ns = Ns Ar string
Packit Service 1d0348
The specified string will be used as the Volume Identifier in the ISO9660 metadata.
Packit Service 1d0348
It is limited to 32 bytes. Default: none.
Packit Service 1d0348
.El
Packit Service 1d0348
.It Format iso9660 - boot support
Packit Service 1d0348
These options are used to make an ISO9660 image that can be directly
Packit Service 1d0348
booted on various systems.
Packit Service 1d0348
.Bl -tag -compact -width indent
Packit Service 1d0348
.It Cm boot Ns = Ns Ar filename
Packit Service 1d0348
The file matching this name will be used as the El Torito boot image file.
Packit Service 1d0348
.It Cm boot-catalog Ns = Ns Ar name
Packit Service 1d0348
The name that will be used for the El Torito boot catalog.
Packit Service 1d0348
Default:
Packit Service 1d0348
.Ar boot.catalog
Packit Service 1d0348
.It Cm boot-info-table
Packit Service 1d0348
The boot image file provided by the
Packit Service 1d0348
.Cm boot Ns = Ns Ar filename
Packit Service 1d0348
option will be edited with appropriate boot information in bytes 8 through 64.
Packit Service 1d0348
Default: disabled
Packit Service 1d0348
.It Cm boot-load-seg Ns = Ns Ar hexadecimal-number
Packit Service 1d0348
The load segment for a no-emulation boot image.
Packit Service 1d0348
.It Cm boot-load-size Ns = Ns Ar decimal-number
Packit Service 1d0348
The number of "virtual" 512-byte sectors to be loaded from a no-emulation boot image.
Packit Service 1d0348
Some very old BIOSes can only load very small images, setting this
Packit Service 1d0348
value to 4 will often allow such BIOSes to load the first part of
Packit Service 1d0348
the boot image (which will then need to be intelligent enough to
Packit Service 1d0348
load the rest of itself).
Packit Service 1d0348
This should not be needed unless you are trying to support systems with very old BIOSes.
Packit Service 1d0348
This defaults to the full size of the image.
Packit Service 1d0348
.It Cm boot-type Ns = Ns Ar value
Packit Service 1d0348
Specifies the boot semantics used by the El Torito boot image:
Packit Service 1d0348
If the
Packit Service 1d0348
.Ar value
Packit Service 1d0348
is
Packit Service 1d0348
.Cm fd ,
Packit Service 1d0348
then the boot image is assumed to be a bootable floppy image.
Packit Service 1d0348
If the
Packit Service 1d0348
.Ar value
Packit Service 1d0348
is
Packit Service 1d0348
.Cm hd ,
Packit Service 1d0348
then the boot image is assumed to be a bootable hard disk image.
Packit Service 1d0348
If the
Packit Service 1d0348
.Ar value
Packit Service 1d0348
is
Packit Service 1d0348
.Cm no-emulation ,
Packit Service 1d0348
the boot image is used without floppy or hard disk emulation.
Packit Service 1d0348
If the boot image is exactly 1.2MB, 1.44MB, or 2.88MB, then
Packit Service 1d0348
the default is
Packit Service 1d0348
.Cm fd ,
Packit Service 1d0348
otherwise the default is
Packit Service 1d0348
.Cm no-emulation.
Packit Service 1d0348
.El
Packit Service 1d0348
.It Format iso9660 - filename and size extensions
Packit Service 1d0348
Various extensions to the base ISO9660 format.
Packit Service 1d0348
.Bl -tag -compact -width indent
Packit Service 1d0348
.It Cm allow-ldots
Packit Service 1d0348
If enabled, allows filenames to begin with a leading period.
Packit Service 1d0348
If disabled, filenames that begin with a leading period will have
Packit Service 1d0348
that period replaced by an underscore character in the standard ISO9660
Packit Service 1d0348
namespace.
Packit Service 1d0348
This does not impact names stored in the Rockridge or Joliet extension area.
Packit Service 1d0348
Default: disabled.
Packit Service 1d0348
.It Cm allow-lowercase
Packit Service 1d0348
If enabled, allows filenames to contain lowercase characters.
Packit Service 1d0348
If disabled, filenames will be forced to uppercase.
Packit Service 1d0348
This does not impact names stored in the Rockridge or Joliet extension area.
Packit Service 1d0348
Default: disabled.
Packit Service 1d0348
.It Cm allow-multidot
Packit Service 1d0348
If enabled, allows filenames to contain multiple period characters, in violation of the ISO9660 specification.
Packit Service 1d0348
If disabled, additional periods will be converted to underscore characters.
Packit Service 1d0348
This does not impact names stored in the Rockridge or Joliet extension area.
Packit Service 1d0348
Default: disabled.
Packit Service 1d0348
.It Cm allow-period
Packit Service 1d0348
If enabled, allows filenames to contain trailing period characters, in violation of the ISO9660 specification.
Packit Service 1d0348
If disabled,trailing periods will be converted to underscore characters.
Packit Service 1d0348
This does not impact names stored in the Rockridge or Joliet extension area.
Packit Service 1d0348
Default: disabled.
Packit Service 1d0348
.It Cm allow-pvd-lowercase
Packit Service 1d0348
If enabled, the Primary Volume Descriptor may contain lowercase ASCII characters, in violation of the ISO9660 specification.
Packit Service 1d0348
If disabled, characters will be converted to uppercase ASCII.
Packit Service 1d0348
Default: disabled.
Packit Service 1d0348
.It Cm allow-sharp-tilde
Packit Service 1d0348
If enabled, sharp and tilde characters will be permitted in filenames, in violation if the ISO9660 specification.
Packit Service 1d0348
If disabled, such characters will be converted to underscore characters.
Packit Service 1d0348
Default: disabled.
Packit Service 1d0348
.It Cm allow-vernum
Packit Service 1d0348
If enabled, version numbers will be included with files.
Packit Service 1d0348
If disabled, version numbers will be suppressed, in violation of the ISO9660 standard.
Packit Service 1d0348
This does not impact names stored in the Rockridge or Joliet extension area.
Packit Service 1d0348
Default: enabled.
Packit Service 1d0348
.It Cm iso-level
Packit Service 1d0348
This enables support for file size and file name extensions in the
Packit Service 1d0348
core ISO9660 area.
Packit Service 1d0348
The name extensions specified here do not affect the names stored in the Rockridge or Joliet extension areas.
Packit Service 1d0348
.Bl -tag -compact -width indent
Packit Service 1d0348
.It Cm iso-level=1
Packit Service 1d0348
The most compliant form of ISO9660 image.
Packit Service 1d0348
Filenames are limited to 8.3 uppercase format,
Packit Service 1d0348
directory names are limited to 8 uppercase characters,
Packit Service 1d0348
files are limited to 4 GiB,
Packit Service 1d0348
the complete ISO9660 image cannot exceed 4 GiB.
Packit Service 1d0348
.It Cm iso-level=2
Packit Service 1d0348
Filenames are limited to 30 uppercase characters with a 30-character extension,
Packit Service 1d0348
directory names are limited to 30 characters,
Packit Service 1d0348
files are limited to 4 GiB.
Packit Service 1d0348
.It Cm iso-level=3
Packit Service 1d0348
As with
Packit Service 1d0348
.Cm iso-level=2 ,
Packit Service 1d0348
except that files may exceed 4 GiB.
Packit Service 1d0348
.It Cm iso-level=4
Packit Service 1d0348
As with
Packit Service 1d0348
.Cm iso-level=3 ,
Packit Service 1d0348
except that filenames may be up to 193 characters
Packit Service 1d0348
and may include arbitrary 8-bit characters.
Packit Service 1d0348
.El
Packit Service 1d0348
.It Cm joliet
Packit Service 1d0348
Microsoft's Joliet extensions store a completely separate set of directory information about each file.
Packit Service 1d0348
In particular, this information includes Unicode filenames of up to 255 characters.
Packit Service 1d0348
Default: enabled.
Packit Service 1d0348
.It Cm limit-depth
Packit Service 1d0348
If enabled, libarchive will use directory relocation records to ensure that
Packit Service 1d0348
no pathname exceeds the ISO9660 limit of 8 directory levels.
Packit Service 1d0348
If disabled, no relocation will occur.
Packit Service 1d0348
Default: enabled.
Packit Service 1d0348
.It Cm limit-dirs
Packit Service 1d0348
If enabled, libarchive will cause an error if there are more than
Packit Service 1d0348
65536 directories.
Packit Service 1d0348
If disabled, there is no limit on the number of directories.
Packit Service 1d0348
Default: enabled
Packit Service 1d0348
.It Cm pad
Packit Service 1d0348
If enabled, 300 kiB of zero bytes will be appended to the end of the archive.
Packit Service 1d0348
Default: enabled
Packit Service 1d0348
.It Cm relaxed-filenames
Packit Service 1d0348
If enabled, all 7-bit ASCII characters are permitted in filenames
Packit Service 1d0348
(except lowercase characters unless
Packit Service 1d0348
.Cm allow-lowercase
Packit Service 1d0348
is also specified).
Packit Service 1d0348
This violates ISO9660 standards.
Packit Service 1d0348
This does not impact names stored in the Rockridge or Joliet extension area.
Packit Service 1d0348
Default: disabled.
Packit Service 1d0348
.It Cm rockridge
Packit Service 1d0348
The Rockridge extensions store an additional set of POSIX-style file
Packit Service 1d0348
information with each file, including mtime, atime, ctime, permissions,
Packit Service 1d0348
and long filenames with arbitrary 8-bit characters.
Packit Service 1d0348
These extensions also support symbolic links and other POSIX file types.
Packit Service 1d0348
Default: enabled.
Packit Service 1d0348
.El
Packit Service 1d0348
.It Format iso9660 - zisofs support
Packit Service 1d0348
The zisofs extensions permit each file to be independently compressed
Packit Service 1d0348
using a gzip-compatible compression.
Packit Service 1d0348
This can provide significant size savings, but requires the reading
Packit Service 1d0348
system to have support for these extensions.
Packit Service 1d0348
These extensions are disabled by default.
Packit Service 1d0348
.Bl -tag -compact -width indent
Packit Service 1d0348
.It Cm compression-level Ns = Ns number
Packit Service 1d0348
The compression level used by the deflate compressor.
Packit Service 1d0348
Ranges from 0 (least effort) to 9 (most effort).
Packit Service 1d0348
Default: 6
Packit Service 1d0348
.It Cm zisofs
Packit Service 1d0348
Synonym for
Packit Service 1d0348
.Cm zisofs=direct .
Packit Service 1d0348
.It Cm zisofs=direct
Packit Service 1d0348
Compress each file in the archive.
Packit Service 1d0348
Unlike
Packit Service 1d0348
.Cm zisofs=indirect ,
Packit Service 1d0348
this is handled entirely within libarchive and does not require a
Packit Service 1d0348
separate utility.
Packit Service 1d0348
For best results, libarchive tests each file and will store
Packit Service 1d0348
the file uncompressed if the compression does not actually save any space.
Packit Service 1d0348
In particular, files under 2k will never be compressed.
Packit Service 1d0348
Note that boot image files are never compressed.
Packit Service 1d0348
.It Cm zisofs=indirect
Packit Service 1d0348
Recognizes files that have already been compressed with the
Packit Service 1d0348
.Cm mkzftree
Packit Service 1d0348
utility and sets up the necessary file metadata so that
Packit Service 1d0348
readers will correctly identify these as zisofs-compressed files.
Packit Service 1d0348
.It Cm zisofs-exclude Ns = Ns Ar filename
Packit Service 1d0348
Specifies a filename that should not be compressed when using
Packit Service 1d0348
.Cm zisofs=direct .
Packit Service 1d0348
This option can be provided multiple times to suppress compression
Packit Service 1d0348
on many files.
Packit Service 1d0348
.El
Packit Service 1d0348
.It Format zip
Packit Service 1d0348
.Bl -tag -compact -width indent
Packit Service 1d0348
.It Cm compression
Packit Service 1d0348
The value is either
Packit Service 1d0348
.Dq store
Packit Service 1d0348
or
Packit Service 1d0348
.Dq deflate
Packit Service 1d0348
to indicate how the following entries should be compressed.
Packit Service 1d0348
Note that this setting is ignored for directories, symbolic links,
Packit Service 1d0348
and other special entries.
Packit Service 1d0348
.It Cm experimental
Packit Service 1d0348
This boolean option enables or disables experimental Zip features
Packit Service 1d0348
that may not be compatible with other Zip implementations.
Packit Service 1d0348
.It Cm fakecrc32
Packit Service 1d0348
This boolean option disables CRC calculations.
Packit Service 1d0348
All CRC fields are set to zero.
Packit Service 1d0348
It should not be used except for testing purposes.
Packit Service 1d0348
.It Cm hdrcharset
Packit Service 1d0348
This sets the character set used for filenames.
Packit Service 1d0348
.It Cm zip64
Packit Service 1d0348
Zip64 extensions provide additional file size information
Packit Service 1d0348
for entries larger than 4 GiB.
Packit Service 1d0348
They also provide extended file offset and archive size information
Packit Service 1d0348
when archives exceed 4 GiB.
Packit Service 1d0348
By default, the Zip writer selectively enables these extensions only as needed.
Packit Service 1d0348
In particular, if the file size is unknown, the Zip writer will
Packit Service 1d0348
include Zip64 extensions to guard against the possibility that the
Packit Service 1d0348
file might be larger than 4 GiB.
Packit Service 1d0348
.Pp
Packit Service 1d0348
Setting this boolean option will force the writer to use Zip64 extensions
Packit Service 1d0348
even for small files that would not otherwise require them.
Packit Service 1d0348
This is primarily useful for testing.
Packit Service 1d0348
.Pp
Packit Service 1d0348
Disabling this option with
Packit Service 1d0348
.Cm !zip64
Packit Service 1d0348
will force the Zip writer to avoid Zip64 extensions:
Packit Service 1d0348
It will reject files with size greater than 4 GiB,
Packit Service 1d0348
it will reject any new entries once the total archive size reaches 4 GiB,
Packit Service 1d0348
and it will not use Zip64 extensions for files with unknown size.
Packit Service 1d0348
In particular, this can improve compatibility when generating archives
Packit Service 1d0348
where the entry sizes are not known in advance.
Packit Service 1d0348
.El
Packit Service 1d0348
.El
Packit Service 1d0348
.Sh EXAMPLES
Packit Service 1d0348
The following example creates an archive write handle to
Packit Service 1d0348
create a gzip-compressed ISO9660 format image.
Packit Service 1d0348
The two options here specify that the ISO9660 archive will use
Packit Service 1d0348
.Ar kernel.img
Packit Service 1d0348
as the boot image for El Torito booting, and that the gzip
Packit Service 1d0348
compressor should use the maximum compression level.
Packit Service 1d0348
.Bd -literal -offset indent
Packit Service 1d0348
a = archive_write_new();
Packit Service 1d0348
archive_write_add_filter_gzip(a);
Packit Service 1d0348
archive_write_set_format_iso9660(a);
Packit Service 1d0348
archive_write_set_options(a, "boot=kernel.img,compression=9");
Packit Service 1d0348
archive_write_open_filename(a, filename, blocksize);
Packit Service 1d0348
.Ed
Packit Service 1d0348
.\"
Packit Service 1d0348
.Sh ERRORS
Packit Service 1d0348
More detailed error codes and textual descriptions are available from the
Packit Service 1d0348
.Fn archive_errno
Packit Service 1d0348
and
Packit Service 1d0348
.Fn archive_error_string
Packit Service 1d0348
functions.
Packit Service 1d0348
.\"
Packit Service 1d0348
.Sh SEE ALSO
Packit Service 1d0348
.Xr tar 1 ,
Packit Service 1d0348
.Xr libarchive 3 ,
Packit Service 1d0348
.Xr archive_read_set_options 3 ,
Packit Service 1d0348
.Xr archive_write 3
Packit Service 1d0348
.Sh HISTORY
Packit Service 1d0348
The
Packit Service 1d0348
.Nm libarchive
Packit Service 1d0348
library first appeared in
Packit Service 1d0348
.Fx 5.3 .
Packit Service 1d0348
.Sh AUTHORS
Packit Service 1d0348
.An -nosplit
Packit Service 1d0348
The options support for libarchive was originally implemented by
Packit Service 1d0348
.An Michihiro NAKAJIMA .
Packit Service 1d0348
.Sh BUGS