Back to Blog
Lzip compression7/21/2023 The string '-' can be used as an alias for standard input. If the $input_filename_or_reference parameter is a filehandle, the input data will be read from it. This file will be opened for reading and the input data will be read from it. If the $input_filename_or_reference parameter is a simple scalar, it is assumed to be a filename. It can take one of the following forms: # A filename The parameter, $input_filename_or_reference, is used to define the source of the compressed data. # anyuncompress $input_filename_or_reference => $output_filename_or_reference Īnyuncompress expects at least two parameters, $input_filename_or_reference and $output_filename_or_reference and zero or more optional parameters (see "Optional Parameters") # The $input_filename_or_reference parameter The functional interface needs Perl5.005 or better. use IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) Īnyuncompress $input_filename_or_reference => $output_filename_or_reference For finer control over the uncompression process, see the "OO Interface" section. # Functional InterfaceĪ top-level function, anyuncompress, is provided to carry out "one-shot" uncompression between buffers and/or files. The module will auto-detect which, if any, of the supported compression formats is being used. The formats supported are: # RFC 1950 # RFC 1951 (optionally) # gzip (RFC 1952) #zip # zstd (Zstandard) #bzip2 #lzop #lzf #lzma #lzip #xz This module provides a Perl interface that allows the reading of files/buffers that have been compressed with a variety of compression libraries. $status = $z->read($buffer, $length, $offset) My $z = IO::Uncompress::AnyUncompress->new( $input ) Or die "anyuncompress failed: $AnyUncompressError\n" My $status = anyuncompress $input => $output IO::Uncompress::AnyUncompress - Uncompress gzip, zip, bzip2, zstd, xz, lzma, lzip, lzf or lzop file/buffer #SYNOPSIS use IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) The $output_filename_or_reference parameter.The $input_filename_or_reference parameter.anyuncompress $input_filename_or_reference => $output_filename_or_reference.
0 Comments
Read More
Leave a Reply. |