Blame libarchive/archive_write_set_options.3

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