4mLIBARCHIVE_CHANGES24m(3)	 Library Functions Manual     4mLIBARCHIVE_CHANGES24m(3)

1mNAME0m
       libarchive_changes — changes in libarchive interface

1mCHANGES IN LIBARCHIVE 30m
       This page describes user-visible changes in libarchive3, and lists pub‐
       lic  functions  and  other  symbols  changed,  deprecated or removed in
       libarchive3, along with their replacements if any.

   1mMultiple Filters0m
       Libarchive2 permitted a single (input or output) filter	active	on  an
       archive.	 Libarchive3 extends this into a variable-length stack.	 Where
       1marchive_write_set_compression_XXX22m()	 would replace any existing filter,
       1marchive_write_add_filter_XXX22m() extends the write pipeline with  another
       filter.

   1mCharacter Set Handling0m
       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 re‐
       quires  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  charac‐
       ter  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	appro‐
       priate default character set:

       If the archive_entry object is bound to an archive, it will use the de‐
       fault character set for that archive.

       The    platform	  default   character	encoding   (as	 returned   by
       1mnl_langinfo22m(4mCHARSET24m)) 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.

   1mPrototype Changes0m
       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:

       1m•    22mIn  some cases, libarchive's wider types will introduce the possi‐
	    bility of truncation: for example,	on  a  system  with  a	16-bit
	    uid_t,  you risk having uid 1m65536 22mbe truncated to uid 1m022m, which can
	    cause serious security problems.

       1m•    22mTypedef function pointer types will be incompatible.  For example,
	    if you define custom skip callbacks, you may have to use code sim‐
	    ilar to the following if you  want	to  support  building  against
	    libarchive2 and libarchive3:

	    #if ARCHIVE_VERSION_NUMBER < 3000000
	    typedef off_t myoff_t;
	    #else
	    typedef int64_t myoff_t;
	    #endif

	    myoff_t
	    my_skip_function(struct archive *a, void *v, myoff_t o)
	    {
		... implementation ...
	    }

       Affected functions:

       1m•   archive_entry_gid22m(), 1marchive_entry_set_gid22m()
       1m•   archive_entry_uid22m(), 1marchive_entry_set_uid22m()
       1m•   archive_entry_ino22m(), 1marchive_entry_set_ino22m()
       1m•   archive_read_data_block22m(), 1marchive_write_data_block22m()
       1m•   archive_read_disk_gname22m(), 1marchive_read_disk_uname22m()
       1m•   archive_read_disk_set_gname_lookup22m(),
	   1marchive_read_disk_set_group_lookup22m(),
	   1marchive_read_disk_set_uname_lookup22m(),
	   1marchive_read_disk_set_user_lookup22m()
       1m•   archive_skip_callback22m()
       1m•   archive_read_extract_set_skip_file22m(),
	   1marchive_write_disk_set_skip_file22m(), 1marchive_write_set_skip_file22m()
       1m•   archive_write_disk_set_group_lookup22m(),
	   1marchive_write_disk_set_user_lookup22m()

       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.

   1mDeprecated Symbols0m
       Symbols	deprecated  in	libarchive3  will  be  removed in libarchive4.
       These symbols, along with their replacements if any, are listed below:

       1marchive_position_compressed22m(), 1marchive_position_uncompressed22m()
	    1marchive_filter_bytes22m()

       1marchive_compression22m()
	    1marchive_filter_code22m()

       1marchive_compression_name22m()
	    1marchive_filter_name22m()

       1marchive_read_finish22m(), 1marchive_write_finish22m()
	    1marchive_read_free22m(), 1marchive_write_free22m()

       1marchive_read_open_file22m(), 1marchive_write_open_file22m()
	    1marchive_read_open_filename22m(), 1marchive_write_open_filename22m()

       1marchive_read_support_compression_all22m()
	    1marchive_read_support_filter_all22m()

       1marchive_read_support_compression_bzip222m()
	    1marchive_read_support_filter_bzip222m()

       1marchive_read_support_compression_compress22m()
	    1marchive_read_support_filter_compress22m()

       1marchive_read_support_compression_gzip22m()
	    1marchive_read_support_filter_gzip22m()

       1marchive_read_support_compression_lzip22m()
	    1marchive_read_support_filter_lzip22m()

       1marchive_read_support_compression_lzma22m()
	    1marchive_read_support_filter_lzma22m()

       1marchive_read_support_compression_none22m()
	    1marchive_read_support_filter_none22m()

       1marchive_read_support_compression_program22m()
	    1marchive_read_support_filter_program22m()

       1marchive_read_support_compression_program_signature22m()
	    1marchive_read_support_filter_program_signature22m()

       1marchive_read_support_compression_rpm22m()
	    1marchive_read_support_filter_rpm22m()

       1marchive_read_support_compression_uu22m()
	    1marchive_read_support_filter_uu22m()

       1marchive_read_support_compression_xz22m()
	    1marchive_read_support_filter_xz22m()

       1marchive_write_set_compression_bzip222m()
	    1marchive_write_add_filter_bzip222m()

       1marchive_write_set_compression_compress22m()
	    1marchive_write_add_filter_compress22m()

       1marchive_write_set_compression_gzip22m()
	    1marchive_write_add_filter_gzip22m()

       1marchive_write_set_compression_lzip22m()
	    1marchive_write_add_filter_lzip22m()

       1marchive_write_set_compression_lzma22m()
	    1marchive_write_add_filter_lzma22m()

       1marchive_write_set_compression_none22m()
	    1marchive_write_add_filter_none22m()

       1marchive_write_set_compression_program22m()
	    1marchive_write_add_filter_program22m()

       1marchive_write_set_compression_filter22m()
	    1marchive_write_add_filter_filter22m()

   1mRemoved Symbols0m
       These symbols, listed below along with their replacements if any,  were
       deprecated in libarchive2, and are not part of libarchive3.

       1marchive_api_feature22m()
	    1marchive_version_number22m()

       1marchive_api_version22m()
	    1marchive_version_number22m()

       1marchive_version22m()
	    1marchive_version_string22m()

       1marchive_version_stamp22m()
	    1marchive_version_number22m()

       1marchive_read_set_filter_options22m()
	    1marchive_read_set_options22m() or 1marchive_read_set_filter_option22m()

       1marchive_read_set_format_options22m()
	    1marchive_read_set_options22m() or 1marchive_read_set_format_option22m()

       1marchive_write_set_filter_options22m()
	    1marchive_write_set_options22m() or 1marchive_write_set_filter_option22m()

       1marchive_write_set_format_options22m()
	    1marchive_write_set_options22m() or 1marchive_write_set_format_option22m()

       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
	    1m5120m

       ARCHIVE_DEFAULT_BYTES_PER_BLOCK
	    1m102400m

1mSEE ALSO0m
       4marchive_read24m(3),	 4marchive_read_filter24m(3),	 4marchive_read_format24m(3),
       4marchive_read_set_options24m(3),     4marchive_util24m(3),     4marchive_write24m(3),
       4marchive_write_filter24m(3),			   4marchive_write_format24m(3),
       4marchive_write_set_options24m(3), 4mlibarchive24m(3)

Debian			       December 23, 2011	 4mLIBARCHIVE_CHANGES24m(3)
