LIBARCHIVE_CHANGES
Section: C Library Functions (3)
Index
Return to Main Contents
BSD mandoc
NAME
libarchive_changes
- changes in libarchive interface
CHANGES IN LIBARCHIVE 3
This page describes user-visible changes in libarchive3, and lists
public functions and other symbols changed, deprecated or removed
in libarchive3, along with their replacements if any.
Multiple Filters
Libarchive2 permitted a single (input or output) filter active
on an archive.
Libarchive3 extends this into a variable-length stack.
Where
Fn archive_write_set_compression_XXX
would replace any existing filter,
Fn archive_write_add_filter_XXX
extends the write pipeline with another filter.
Character Set Handling
Libarchive2 assumed that the local platform uses
Unicode
as the native
wchar_t
encoding, which is true on
Windows
modern
Linux
and a few other systems, but is certainly not universal.
As a result, pax format archives were written incorrectly on some
systems, since pax format requires
UTF-8
and libarchive 2 incorrectly
assumed that
wchar_t
strings can be easily converted to
UTF-8
Libarchive3 uses the standard iconv library to convert between character
sets and is introducing the notion of a
``default character set for the archive''
To support this,
archive_entry
objects can now be bound to a particular archive when they are created.
The automatic character set conversions performed by
archive_entry
objects when reading and writing filenames, usernames, and other strings
will now use an appropriate default character set:
If the
archive_entry
object is bound to an archive, it will use the
default character set for that archive.
The platform default character encoding (as returned by
Fn nl_langinfo CHARSET )
will be used if nothing else is specified.
Libarchive3 also introduces charset options to many of the archive
readers and writers to control the character set that will be used for
filenames written in those archives.
When possible, this will be set automatically based on information in
the archive itself.
Combining this with the notion of a default character set for the
archive should allow you to configure libarchive to read archives from
other platforms and have the filenames and other information
transparently converted to the character encoding suitable for your
application.
Prototype Changes
These changes break binary compatibility; libarchive3 has a new shared
library version to reflect these changes.
The library now uses portable wide types such as
int64_t
instead of less-portable types such as
off_t
gid_t
uid_t
and
ino_t
There are a few cases where these changes will affect your source code:
Affected functions:
-
Fn archive_entry_gid ,
Fn archive_entry_set_gid
-
Fn archive_entry_uid ,
Fn archive_entry_set_uid
-
Fn archive_entry_ino ,
Fn archive_entry_set_ino
-
Fn archive_read_data_block ,
Fn archive_write_data_block
-
Fn archive_read_disk_gname ,
Fn archive_read_disk_uname
-
Fn archive_read_disk_set_gname_lookup ,
Fn archive_read_disk_set_group_lookup ,
Fn archive_read_disk_set_uname_lookup ,
Fn archive_read_disk_set_user_lookup
-
Fn archive_skip_callback
-
Fn archive_read_extract_set_skip_file ,
Fn archive_write_disk_set_skip_file ,
Fn archive_write_set_skip_file
-
Fn archive_write_disk_set_group_lookup ,
Fn archive_write_disk_set_user_lookup
Where these functions or their arguments took or returned
gid_t
ino_t
off_t
or
uid_t
they now take or return
int64_t
or equivalent.
Deprecated Symbols
Symbols deprecated in libarchive3 will be removed in libarchive4.
These symbols, along with their replacements if any, are listed below:
- Fn archive_position_compressed , Fn archive_position_uncompressed
-
Fn archive_filter_bytes
- Fn archive_compression
-
Fn archive_filter_code
- Fn archive_compression_name
-
Fn archive_filter_name
- Fn archive_read_finish , Fn archive_write_finish
-
Fn archive_read_free ,
Fn archive_write_free
- Fn archive_read_open_file , Fn archive_write_open_file
-
Fn archive_read_open_filename ,
Fn archive_write_open_filename
- Fn archive_read_support_compression_all
-
Fn archive_read_support_filter_all
- Fn archive_read_support_compression_bzip2
-
Fn archive_read_support_filter_bzip2
- Fn archive_read_support_compression_compress
-
Fn archive_read_support_filter_compress
- Fn archive_read_support_compression_gzip
-
Fn archive_read_support_filter_gzip
- Fn archive_read_support_compression_lzip
-
Fn archive_read_support_filter_lzip
- Fn archive_read_support_compression_lzma
-
Fn archive_read_support_filter_lzma
- Fn archive_read_support_compression_none
-
Fn archive_read_support_filter_none
- Fn archive_read_support_compression_program
-
Fn archive_read_support_filter_program
- Fn archive_read_support_compression_program_signature
-
Fn archive_read_support_filter_program_signature
- Fn archive_read_support_compression_rpm
-
Fn archive_read_support_filter_rpm
- Fn archive_read_support_compression_uu
-
Fn archive_read_support_filter_uu
- Fn archive_read_support_compression_xz
-
Fn archive_read_support_filter_xz
- Fn archive_write_set_compression_bzip2
-
Fn archive_write_add_filter_bzip2
- Fn archive_write_set_compression_compress
-
Fn archive_write_add_filter_compress
- Fn archive_write_set_compression_gzip
-
Fn archive_write_add_filter_gzip
- Fn archive_write_set_compression_lzip
-
Fn archive_write_add_filter_lzip
- Fn archive_write_set_compression_lzma
-
Fn archive_write_add_filter_lzma
- Fn archive_write_set_compression_none
-
Fn archive_write_add_filter_none
- Fn archive_write_set_compression_program
-
Fn archive_write_add_filter_program
- Fn archive_write_set_compression_filter
-
Fn archive_write_add_filter_filter
Removed Symbols
These symbols, listed below along with their replacements if any,
were deprecated in libarchive2, and are not part of libarchive3.
- Fn archive_api_feature
-
Fn archive_version_number
- Fn archive_api_version
-
Fn archive_version_number
- Fn archive_version
-
Fn archive_version_string
- Fn archive_version_stamp
-
Fn archive_version_number
- Fn archive_read_set_filter_options
-
Fn archive_read_set_options
or
Fn archive_read_set_filter_option
- Fn archive_read_set_format_options
-
Fn archive_read_set_options
or
Fn archive_read_set_format_option
- Fn archive_write_set_filter_options
-
Fn archive_write_set_options
or
Fn archive_write_set_filter_option
- Fn archive_write_set_format_options
-
Fn archive_write_set_options
or
Fn archive_write_set_format_option
- ARCHIVE_API_FEATURE
-
ARCHIVE_VERSION_NUMBER
- ARCHIVE_API_VERSION
-
ARCHIVE_VERSION_NUMBER
- ARCHIVE_VERSION_STAMP
-
ARCHIVE_VERSION_NUMBER
- ARCHIVE_LIBRARY_VERSION
-
ARCHIVE_VERSION_STRING
- ARCHIVE_COMPRESSION_NONE
-
ARCHIVE_FILTER_NONE
- ARCHIVE_COMPRESSION_GZIP
-
ARCHIVE_FILTER_GZIP
- ARCHIVE_COMPRESSION_BZIP2
-
ARCHIVE_FILTER_BZIP2
- ARCHIVE_COMPRESSION_COMPRESS
-
ARCHIVE_FILTER_COMPRESS
- ARCHIVE_COMPRESSION_PROGRAM
-
ARCHIVE_FILTER_PROGRAM
- ARCHIVE_COMPRESSION_LZMA
-
ARCHIVE_FILTER_LZMA
- ARCHIVE_COMPRESSION_XZ
-
ARCHIVE_FILTER_XZ
- ARCHIVE_COMPRESSION_UU
-
ARCHIVE_FILTER_UU
- ARCHIVE_COMPRESSION_RPM
-
ARCHIVE_FILTER_RPM
- ARCHIVE_COMPRESSION_LZIP
-
ARCHIVE_FILTER_LZIP
- ARCHIVE_BYTES_PER_RECORD
-
512
- ARCHIVE_DEFAULT_BYTES_PER_BLOCK
-
10240
SEE ALSO
libarchive(3),
archive_read3,
archive_read_filter3,
archive_read_format3,
archive_read_set_options3,
archive_write3,
archive_write_filter3,
archive_write_format3,
archive_write_set_options3,
archive_util3
Index
- NAME
-
- CHANGES IN LIBARCHIVE 3
-
- Multiple Filters
-
- Character Set Handling
-
- Prototype Changes
-
- Deprecated Symbols
-
- Removed Symbols
-
- SEE ALSO
-