Archive-Libarchive-XS
view release on metacpan or search on metacpan
lib/Archive/Libarchive/XS/Function.pod view on Meta::CPAN
(depending on the implementation), either way, it can be passed into
any of the read functions documented here with an C<$archive> argument.
=head2 archive_read_next_header
my $status = archive_read_next_header($archive, $entry);
Read the header for the next entry and return an entry object
Returns an opaque archive which may be a perl style object, or a C pointer
(depending on the implementation), either way, it can be passed into
any of the functions documented here with an <$entry> argument.
=head2 archive_read_next_header2
my $status = archive_read_next_header2($archive, $entry);
Read the header for the next entry and populate the provided entry object.
=head2 archive_read_open
my $status = archive_read_open($archive, $data, $open_cb, $read_cb, $close_cb);
The same as C<archive_read_open2>, except that the skip callback is assumed to be C<undef>.
=head2 archive_read_open1
my $status = archive_read_open1($archive);
Opening freezes the callbacks.
=head2 archive_read_open2
my $status = archive_read_open2($archive, $data, $open_cb, $read_cb, $skip_cb, $close_cb);
Freeze the settings, open the archive, and prepare for reading entries. This is the most
generic version of this call, which accepts four callback functions. Most clients will
want to use C<archive_read_open_filename>, C<archive_read_open_FILE>, C<archive_read_open_fd>,
or C<archive_read_open_memory> instead. The library invokes the client-provided functions to
obtain raw bytes from the archive.
=head2 archive_read_open_fh
my $status = archive_read_open_fh($archive, $fh, $block_size);
Like L<archive_read_open_filename|Archive::Libarchive::XS::Function#archive_read_open_filename>, except that it accepts a file handle and block
size rather than a filename. Note that the file handle will not be automatically
closed at end-of-archive.
If not specified, a block size of 10240 will be used.
There is no corresponding archive_read_open_fh in the C version of libarchive.
This is provided in the place of C<archive_read_open_FILE> and C<archive_read_open_fd>,
which are not in the Perl bindings for libarchive.
=head2 archive_read_open_filename
my $status = archive_read_open_filename($archive, $filename, $block_size);
Like C<archive_read_open>, except that it accepts a simple filename
and a block size. This function is safe for use with tape drives
or other blocked devices.
If you pass in C<undef> as the C<$filename>, libarchive will use
standard in as the input archive.
=head2 archive_read_open_filenames
my $status = archive_read_open_filenames($archive, \@filenames, $block_size);
Use this for reading multivolume files by filenames.
=head2 archive_read_open_memory
my $status = archive_read_open_memory($archive, $buffer);
Like C<archive_read_open>, except that it uses a Perl scalar that holds the
content of the archive. This function does not make a copy of the data stored
in C<$buffer>, so you should not modify the buffer until you have free the
archive using C<archive_read_free>.
Bad things will happen if the buffer falls out of scope and is deallocated
before you free the archive, so make sure that there is a reference to the
buffer somewhere in your programmer until C<archive_read_free> is called.
=head2 archive_read_set_callback_data
my $status = archive_read_set_callback_data($archive, $data);
Set the client data for callbacks.
=head2 archive_read_set_close_callback
my $status = archive_read_set_close_callback($archive, $callback);
Set the close callback for the archive object.
=head2 archive_read_set_filter_option
my $status = archive_read_set_filter_option($archive, $module, $option, $value);
Specifies an option that will be passed to currently-registered filters
(including decompression filters).
If option and value are both C<undef>, these functions will do nothing
and C<ARCHIVE_OK> will be returned. If option is C<undef> but value is
not, these functions will do nothing and C<ARCHIVE_FAILED> will be
returned.
If module is not C<undef>, option and value will be provided to the filter
or reader named module. The return value will be that of the module.
If there is no such module, C<ARCHIVE_FAILED> will be returned.
If module is C<NULL>, option and value will be provided to every registered
module. If any module returns C<ARCHIVE_FATAL>, this value will be
returned immediately. Otherwise, C<ARCHIVE_OK> will be returned if any
module accepts the option, and C<ARCHIVE_FAILED> in all other cases.
=head2 archive_read_set_format
my $status = archive_read_set_format($archive, $format);
lib/Archive/Libarchive/XS/Function.pod view on Meta::CPAN
=head2 archive_write_add_filter_bzip2
my $status = archive_write_add_filter_bzip2($archive);
Add bzip2 filter
=head2 archive_write_add_filter_compress
my $status = archive_write_add_filter_compress($archive);
Add compress filter
=head2 archive_write_add_filter_grzip
my $status = archive_write_add_filter_grzip($archive);
Add grzip filter
=head2 archive_write_add_filter_gzip
my $status = archive_write_add_filter_gzip($archive);
Add gzip filter
=head2 archive_write_add_filter_lrzip
my $status = archive_write_add_filter_lrzip($archive);
Add lrzip filter
=head2 archive_write_add_filter_lzip
my $status = archive_write_add_filter_lzip($archive);
Add lzip filter
=head2 archive_write_add_filter_lzma
my $status = archive_write_add_filter_lzma($archive);
Add lzma filter
=head2 archive_write_add_filter_lzop
my $status = archive_write_add_filter_lzop($archive);
Add lzop filter
=head2 archive_write_add_filter_none
my $status = archive_write_add_filter_none($archive);
Add none filter
=head2 archive_write_add_filter_program
my $status = archive_write_add_filter_program($archive, $cmd);
The archive will be fed into the specified compression program.
The output of that program is blocked and written to the client
write callbacks.
=head2 archive_write_add_filter_uuencode
my $status = archive_write_add_filter_uuencode($archive);
Add uuencode filter
=head2 archive_write_add_filter_xz
my $status = archive_write_add_filter_xz($archive);
Add xz filter
=head2 archive_write_close
my $status = archive_write_close($archive)
Complete the archive and invoke the close callback.
=head2 archive_write_data
my $status = archive_write_data($archive, $buffer);
Write data corresponding to the header just written.
This function returns the number of bytes actually written, or -1 on error.
=head2 archive_write_data_block
my $count_or_status = archive_write_data_block($archive, $buffer, $offset);
Writes the buffer to the current entry in the given archive
starting at the given offset.
=head2 archive_write_disk_gid
my $int64 = archive_write_disk_gid($archive, $string, $int64);
Undocumented libarchive function.
=head2 archive_write_disk_new
my $archive = archive_write_disk_new();
Allocates and initializes a struct archive object suitable for
writing objects to disk.
Returns an opaque archive which may be a perl style object, or a C pointer
(Depending on the implementation), either way, it can be passed into
any of the write functions documented here with an C<$archive> argument.
=head2 archive_write_disk_set_group_lookup
my $status = archive_write_disk_set_group_lookup($archive, $data, $lookup_callback, $cleanup_callback);
Register a callback for the lookup of group names from group id numbers. In order to deregister
call C<archive_write_disk_set_group_lookup> with both callback functions set to C<undef>.
See L<Archive::Libarchive::XS::Callback> for calling conventions for the lookup and cleanup callbacks.
( run in 0.423 second using v1.01-cache-2.11-cpan-5b529ec07f3 )