1package IO::Uncompress::UnXz ; 2 3use strict ; 4use warnings; 5use bytes; 6 7use IO::Compress::Base::Common 2.101 qw(:Status createSelfTiedObject); 8 9use IO::Uncompress::Base 2.101 ; 10use IO::Uncompress::Adapter::UnXz 2.101 ; 11 12require Exporter ; 13our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $UnXzError); 14 15$VERSION = '2.101'; 16$UnXzError = ''; 17 18@ISA = qw( IO::Uncompress::Base Exporter ); 19@EXPORT_OK = qw( $UnXzError unxz ) ; 20#%EXPORT_TAGS = %IO::Uncompress::Base::EXPORT_TAGS ; 21push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ; 22#Exporter::export_ok_tags('all'); 23 24 25sub new 26{ 27 my $class = shift ; 28 my $obj = createSelfTiedObject($class, \$UnXzError); 29 30 $obj->_create(undef, 0, @_); 31} 32 33sub unxz 34{ 35 my $obj = createSelfTiedObject(undef, \$UnXzError); 36 return $obj->_inf(@_); 37} 38 39our %PARAMS = ( 40 'memlimit' => [IO::Compress::Base::Common::Parse_unsigned, 128 * 1024 * 1024], 41 'flags' => [IO::Compress::Base::Common::Parse_boolean, 0], 42 ); 43 44sub getExtraParams 45{ 46 return %PARAMS ; 47} 48 49 50sub ckParams 51{ 52 my $self = shift ; 53 my $got = shift ; 54 55 return 1; 56} 57 58sub mkUncomp 59{ 60 my $self = shift ; 61 my $got = shift ; 62 63 my $magic = $self->ckMagic() 64 or return 0; 65 66 *$self->{Info} = $self->readHeader($magic) 67 or return undef ; 68 69 my $memlimit = $got->getValue('memlimit'); 70 my $flags = $got->getValue('flags'); 71 72 my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::UnXz::mkUncompObject( 73 $memlimit, $flags); 74 75 return $self->saveErrorString(undef, $errstr, $errno) 76 if ! defined $obj; 77 78 *$self->{Uncomp} = $obj; 79 80 return 1; 81 82} 83 84 85use constant XZ_ID_SIZE => 6; 86use constant XZ_MAGIC => "\0xFD". '7zXZ'. "\0x00" ; 87 88sub ckMagic 89{ 90 my $self = shift; 91 92 my $magic ; 93 $self->smartReadExact(\$magic, XZ_ID_SIZE); 94 95 *$self->{HeaderPending} = $magic ; 96 97 return $self->HeaderError("Header size is " . 98 XZ_ID_SIZE . " bytes") 99 if length $magic != XZ_ID_SIZE; 100 101 return $self->HeaderError("Bad Magic.") 102 if ! isXzMagic($magic) ; 103 104 105 *$self->{Type} = 'xz'; 106 return $magic; 107} 108 109sub readHeader 110{ 111 my $self = shift; 112 my $magic = shift ; 113 114 $self->pushBack($magic); 115 *$self->{HeaderPending} = ''; 116 117 118 return { 119 'Type' => 'xz', 120 'FingerprintLength' => XZ_ID_SIZE, 121 'HeaderLength' => XZ_ID_SIZE, 122 'TrailerLength' => 0, 123 'Header' => '$magic' 124 }; 125 126} 127 128sub chkTrailer 129{ 130 return STATUS_OK; 131} 132 133 134 135sub isXzMagic 136{ 137 my $buffer = shift ; 138 return $buffer =~ /^\xFD\x37\x7A\x58\x5A\x00/; 139} 140 1411 ; 142 143__END__ 144 145 146=head1 NAME 147 148IO::Uncompress::UnXz - Read xz files/buffers 149 150=head1 SYNOPSIS 151 152 use IO::Uncompress::UnXz qw(unxz $UnXzError) ; 153 154 my $status = unxz $input => $output [,OPTS] 155 or die "unxz failed: $UnXzError\n"; 156 157 my $z = IO::Uncompress::UnXz->new( $input [OPTS] ) 158 or die "unxz failed: $UnXzError\n"; 159 160 $status = $z->read($buffer) 161 $status = $z->read($buffer, $length) 162 $status = $z->read($buffer, $length, $offset) 163 $line = $z->getline() 164 $char = $z->getc() 165 $char = $z->ungetc() 166 $char = $z->opened() 167 168 $data = $z->trailingData() 169 $status = $z->nextStream() 170 $data = $z->getHeaderInfo() 171 $z->tell() 172 $z->seek($position, $whence) 173 $z->binmode() 174 $z->fileno() 175 $z->eof() 176 $z->close() 177 178 $UnXzError ; 179 180 # IO::File mode 181 182 <$z> 183 read($z, $buffer); 184 read($z, $buffer, $length); 185 read($z, $buffer, $length, $offset); 186 tell($z) 187 seek($z, $position, $whence) 188 binmode($z) 189 fileno($z) 190 eof($z) 191 close($z) 192 193=head1 DESCRIPTION 194 195This module provides a Perl interface that allows the reading of 196lzma files/buffers. 197 198For writing xz files/buffers, see the companion module IO::Compress::Xz. 199 200=head1 Functional Interface 201 202A top-level function, C<unxz>, is provided to carry out 203"one-shot" uncompression between buffers and/or files. For finer 204control over the uncompression process, see the L</"OO Interface"> 205section. 206 207 use IO::Uncompress::UnXz qw(unxz $UnXzError) ; 208 209 unxz $input_filename_or_reference => $output_filename_or_reference [,OPTS] 210 or die "unxz failed: $UnXzError\n"; 211 212The functional interface needs Perl5.005 or better. 213 214=head2 unxz $input_filename_or_reference => $output_filename_or_reference [, OPTS] 215 216C<unxz> expects at least two parameters, 217C<$input_filename_or_reference> and C<$output_filename_or_reference> 218and zero or more optional parameters (see L</Optional Parameters>) 219 220=head3 The C<$input_filename_or_reference> parameter 221 222The parameter, C<$input_filename_or_reference>, is used to define the 223source of the compressed data. 224 225It can take one of the following forms: 226 227=over 5 228 229=item A filename 230 231If the C<$input_filename_or_reference> parameter is a simple scalar, it is 232assumed to be a filename. This file will be opened for reading and the 233input data will be read from it. 234 235=item A filehandle 236 237If the C<$input_filename_or_reference> parameter is a filehandle, the input 238data will be read from it. The string '-' can be used as an alias for 239standard input. 240 241=item A scalar reference 242 243If C<$input_filename_or_reference> is a scalar reference, the input data 244will be read from C<$$input_filename_or_reference>. 245 246=item An array reference 247 248If C<$input_filename_or_reference> is an array reference, each element in 249the array must be a filename. 250 251The input data will be read from each file in turn. 252 253The complete array will be walked to ensure that it only 254contains valid filenames before any data is uncompressed. 255 256=item An Input FileGlob string 257 258If C<$input_filename_or_reference> is a string that is delimited by the 259characters "<" and ">" C<unxz> will assume that it is an 260I<input fileglob string>. The input is the list of files that match the 261fileglob. 262 263See L<File::GlobMapper|File::GlobMapper> for more details. 264 265=back 266 267If the C<$input_filename_or_reference> parameter is any other type, 268C<undef> will be returned. 269 270=head3 The C<$output_filename_or_reference> parameter 271 272The parameter C<$output_filename_or_reference> is used to control the 273destination of the uncompressed data. This parameter can take one of 274these forms. 275 276=over 5 277 278=item A filename 279 280If the C<$output_filename_or_reference> parameter is a simple scalar, it is 281assumed to be a filename. This file will be opened for writing and the 282uncompressed data will be written to it. 283 284=item A filehandle 285 286If the C<$output_filename_or_reference> parameter is a filehandle, the 287uncompressed data will be written to it. The string '-' can be used as 288an alias for standard output. 289 290=item A scalar reference 291 292If C<$output_filename_or_reference> is a scalar reference, the 293uncompressed data will be stored in C<$$output_filename_or_reference>. 294 295=item An Array Reference 296 297If C<$output_filename_or_reference> is an array reference, 298the uncompressed data will be pushed onto the array. 299 300=item An Output FileGlob 301 302If C<$output_filename_or_reference> is a string that is delimited by the 303characters "<" and ">" C<unxz> will assume that it is an 304I<output fileglob string>. The output is the list of files that match the 305fileglob. 306 307When C<$output_filename_or_reference> is an fileglob string, 308C<$input_filename_or_reference> must also be a fileglob string. Anything 309else is an error. 310 311See L<File::GlobMapper|File::GlobMapper> for more details. 312 313=back 314 315If the C<$output_filename_or_reference> parameter is any other type, 316C<undef> will be returned. 317 318=head2 Notes 319 320When C<$input_filename_or_reference> maps to multiple compressed 321files/buffers and C<$output_filename_or_reference> is 322a single file/buffer, after uncompression C<$output_filename_or_reference> will contain a 323concatenation of all the uncompressed data from each of the input 324files/buffers. 325 326=head2 Optional Parameters 327 328The optional parameters for the one-shot function C<unxz> 329are (for the most part) identical to those used with the OO interface defined in the 330L</"Constructor Options"> section. The exceptions are listed below 331 332=over 5 333 334=item C<< AutoClose => 0|1 >> 335 336This option applies to any input or output data streams to 337C<unxz> that are filehandles. 338 339If C<AutoClose> is specified, and the value is true, it will result in all 340input and/or output filehandles being closed once C<unxz> has 341completed. 342 343This parameter defaults to 0. 344 345=item C<< BinModeOut => 0|1 >> 346 347This option is now a no-op. All files will be written in binmode. 348 349=item C<< Append => 0|1 >> 350 351The behaviour of this option is dependent on the type of output data 352stream. 353 354=over 5 355 356=item * A Buffer 357 358If C<Append> is enabled, all uncompressed data will be append to the end of 359the output buffer. Otherwise the output buffer will be cleared before any 360uncompressed data is written to it. 361 362=item * A Filename 363 364If C<Append> is enabled, the file will be opened in append mode. Otherwise 365the contents of the file, if any, will be truncated before any uncompressed 366data is written to it. 367 368=item * A Filehandle 369 370If C<Append> is enabled, the filehandle will be positioned to the end of 371the file via a call to C<seek> before any uncompressed data is 372written to it. Otherwise the file pointer will not be moved. 373 374=back 375 376When C<Append> is specified, and set to true, it will I<append> all uncompressed 377data to the output data stream. 378 379So when the output is a filehandle it will carry out a seek to the eof 380before writing any uncompressed data. If the output is a filename, it will be opened for 381appending. If the output is a buffer, all uncompressed data will be 382appended to the existing buffer. 383 384Conversely when C<Append> is not specified, or it is present and is set to 385false, it will operate as follows. 386 387When the output is a filename, it will truncate the contents of the file 388before writing any uncompressed data. If the output is a filehandle 389its position will not be changed. If the output is a buffer, it will be 390wiped before any uncompressed data is output. 391 392Defaults to 0. 393 394=item C<< MultiStream => 0|1 >> 395 396If the input file/buffer contains multiple compressed data streams, this 397option will uncompress the whole lot as a single data stream. 398 399Defaults to 0. 400 401=item C<< TrailingData => $scalar >> 402 403Returns the data, if any, that is present immediately after the compressed 404data stream once uncompression is complete. 405 406This option can be used when there is useful information immediately 407following the compressed data stream, and you don't know the length of the 408compressed data stream. 409 410If the input is a buffer, C<trailingData> will return everything from the 411end of the compressed data stream to the end of the buffer. 412 413If the input is a filehandle, C<trailingData> will return the data that is 414left in the filehandle input buffer once the end of the compressed data 415stream has been reached. You can then use the filehandle to read the rest 416of the input file. 417 418Don't bother using C<trailingData> if the input is a filename. 419 420If you know the length of the compressed data stream before you start 421uncompressing, you can avoid having to use C<trailingData> by setting the 422C<InputLength> option. 423 424=back 425 426=head2 Examples 427 428To read the contents of the file C<file1.txt.xz> and write the 429uncompressed data to the file C<file1.txt>. 430 431 use strict ; 432 use warnings ; 433 use IO::Uncompress::UnXz qw(unxz $UnXzError) ; 434 435 my $input = "file1.txt.xz"; 436 my $output = "file1.txt"; 437 unxz $input => $output 438 or die "unxz failed: $UnXzError\n"; 439 440To read from an existing Perl filehandle, C<$input>, and write the 441uncompressed data to a buffer, C<$buffer>. 442 443 use strict ; 444 use warnings ; 445 use IO::Uncompress::UnXz qw(unxz $UnXzError) ; 446 use IO::File ; 447 448 my $input = IO::File->new( "<file1.txt.xz" ) 449 or die "Cannot open 'file1.txt.xz': $!\n" ; 450 my $buffer ; 451 unxz $input => \$buffer 452 or die "unxz failed: $UnXzError\n"; 453 454To uncompress all files in the directory "/my/home" that match "*.txt.xz" and store the compressed data in the same directory 455 456 use strict ; 457 use warnings ; 458 use IO::Uncompress::UnXz qw(unxz $UnXzError) ; 459 460 unxz '</my/home/*.txt.xz>' => '</my/home/#1.txt>' 461 or die "unxz failed: $UnXzError\n"; 462 463and if you want to compress each file one at a time, this will do the trick 464 465 use strict ; 466 use warnings ; 467 use IO::Uncompress::UnXz qw(unxz $UnXzError) ; 468 469 for my $input ( glob "/my/home/*.txt.xz" ) 470 { 471 my $output = $input; 472 $output =~ s/.xz// ; 473 unxz $input => $output 474 or die "Error compressing '$input': $UnXzError\n"; 475 } 476 477=head1 OO Interface 478 479=head2 Constructor 480 481The format of the constructor for IO::Uncompress::UnXz is shown below 482 483 my $z = IO::Uncompress::UnXz->new( $input [OPTS] ) 484 or die "IO::Uncompress::UnXz failed: $UnXzError\n"; 485 486Returns an C<IO::Uncompress::UnXz> object on success and undef on failure. 487The variable C<$UnXzError> will contain an error message on failure. 488 489If you are running Perl 5.005 or better the object, C<$z>, returned from 490IO::Uncompress::UnXz can be used exactly like an L<IO::File|IO::File> filehandle. 491This means that all normal input file operations can be carried out with 492C<$z>. For example, to read a line from a compressed file/buffer you can 493use either of these forms 494 495 $line = $z->getline(); 496 $line = <$z>; 497 498The mandatory parameter C<$input> is used to determine the source of the 499compressed data. This parameter can take one of three forms. 500 501=over 5 502 503=item A filename 504 505If the C<$input> parameter is a scalar, it is assumed to be a filename. This 506file will be opened for reading and the compressed data will be read from it. 507 508=item A filehandle 509 510If the C<$input> parameter is a filehandle, the compressed data will be 511read from it. 512The string '-' can be used as an alias for standard input. 513 514=item A scalar reference 515 516If C<$input> is a scalar reference, the compressed data will be read from 517C<$$input>. 518 519=back 520 521=head2 Constructor Options 522 523The option names defined below are case insensitive and can be optionally 524prefixed by a '-'. So all of the following are valid 525 526 -AutoClose 527 -autoclose 528 AUTOCLOSE 529 autoclose 530 531OPTS is a combination of the following options: 532 533=over 5 534 535=item C<< AutoClose => 0|1 >> 536 537This option is only valid when the C<$input> parameter is a filehandle. If 538specified, and the value is true, it will result in the file being closed once 539either the C<close> method is called or the IO::Uncompress::UnXz object is 540destroyed. 541 542This parameter defaults to 0. 543 544=item C<< MultiStream => 0|1 >> 545 546Allows multiple concatenated compressed streams to be treated as a single 547compressed stream. Decompression will stop once either the end of the 548file/buffer is reached, an error is encountered (premature eof, corrupt 549compressed data) or the end of a stream is not immediately followed by the 550start of another stream. 551 552This parameter defaults to 0. 553 554=item C<< Prime => $string >> 555 556This option will uncompress the contents of C<$string> before processing the 557input file/buffer. 558 559This option can be useful when the compressed data is embedded in another 560file/data structure and it is not possible to work out where the compressed 561data begins without having to read the first few bytes. If this is the 562case, the uncompression can be I<primed> with these bytes using this 563option. 564 565=item C<< Transparent => 0|1 >> 566 567If this option is set and the input file/buffer is not compressed data, 568the module will allow reading of it anyway. 569 570In addition, if the input file/buffer does contain compressed data and 571there is non-compressed data immediately following it, setting this option 572will make this module treat the whole file/buffer as a single data stream. 573 574This option defaults to 1. 575 576=item C<< BlockSize => $num >> 577 578When reading the compressed input data, IO::Uncompress::UnXz will read it in 579blocks of C<$num> bytes. 580 581This option defaults to 4096. 582 583=item C<< InputLength => $size >> 584 585When present this option will limit the number of compressed bytes read 586from the input file/buffer to C<$size>. This option can be used in the 587situation where there is useful data directly after the compressed data 588stream and you know beforehand the exact length of the compressed data 589stream. 590 591This option is mostly used when reading from a filehandle, in which case 592the file pointer will be left pointing to the first byte directly after the 593compressed data stream. 594 595This option defaults to off. 596 597=item C<< Append => 0|1 >> 598 599This option controls what the C<read> method does with uncompressed data. 600 601If set to 1, all uncompressed data will be appended to the output parameter 602of the C<read> method. 603 604If set to 0, the contents of the output parameter of the C<read> method 605will be overwritten by the uncompressed data. 606 607Defaults to 0. 608 609=item C<< Strict => 0|1 >> 610 611This option controls whether the extra checks defined below are used when 612carrying out the decompression. When Strict is on, the extra tests are 613carried out, when Strict is off they are not. 614 615The default for this option is off. 616 617=item C<< MemLimit => $number >> 618 619Default is 128Meg. 620 621=item C<< Flags => $flags >> 622 623Default is 0. 624 625=back 626 627=head2 Examples 628 629TODO 630 631=head1 Methods 632 633=head2 read 634 635Usage is 636 637 $status = $z->read($buffer) 638 639Reads a block of compressed data (the size of the compressed block is 640determined by the C<Buffer> option in the constructor), uncompresses it and 641writes any uncompressed data into C<$buffer>. If the C<Append> parameter is 642set in the constructor, the uncompressed data will be appended to the 643C<$buffer> parameter. Otherwise C<$buffer> will be overwritten. 644 645Returns the number of uncompressed bytes written to C<$buffer>, zero if eof 646or a negative number on error. 647 648=head2 read 649 650Usage is 651 652 $status = $z->read($buffer, $length) 653 $status = $z->read($buffer, $length, $offset) 654 655 $status = read($z, $buffer, $length) 656 $status = read($z, $buffer, $length, $offset) 657 658Attempt to read C<$length> bytes of uncompressed data into C<$buffer>. 659 660The main difference between this form of the C<read> method and the 661previous one, is that this one will attempt to return I<exactly> C<$length> 662bytes. The only circumstances that this function will not is if end-of-file 663or an IO error is encountered. 664 665Returns the number of uncompressed bytes written to C<$buffer>, zero if eof 666or a negative number on error. 667 668=head2 getline 669 670Usage is 671 672 $line = $z->getline() 673 $line = <$z> 674 675Reads a single line. 676 677This method fully supports the use of the variable C<$/> (or 678C<$INPUT_RECORD_SEPARATOR> or C<$RS> when C<English> is in use) to 679determine what constitutes an end of line. Paragraph mode, record mode and 680file slurp mode are all supported. 681 682=head2 getc 683 684Usage is 685 686 $char = $z->getc() 687 688Read a single character. 689 690=head2 ungetc 691 692Usage is 693 694 $char = $z->ungetc($string) 695 696=head2 getHeaderInfo 697 698Usage is 699 700 $hdr = $z->getHeaderInfo(); 701 @hdrs = $z->getHeaderInfo(); 702 703This method returns either a hash reference (in scalar context) or a list 704or hash references (in array context) that contains information about each 705of the header fields in the compressed data stream(s). 706 707=head2 tell 708 709Usage is 710 711 $z->tell() 712 tell $z 713 714Returns the uncompressed file offset. 715 716=head2 eof 717 718Usage is 719 720 $z->eof(); 721 eof($z); 722 723Returns true if the end of the compressed input stream has been reached. 724 725=head2 seek 726 727 $z->seek($position, $whence); 728 seek($z, $position, $whence); 729 730Provides a sub-set of the C<seek> functionality, with the restriction 731that it is only legal to seek forward in the input file/buffer. 732It is a fatal error to attempt to seek backward. 733 734Note that the implementation of C<seek> in this module does not provide 735true random access to a compressed file/buffer. It works by uncompressing 736data from the current offset in the file/buffer until it reaches the 737uncompressed offset specified in the parameters to C<seek>. For very small 738files this may be acceptable behaviour. For large files it may cause an 739unacceptable delay. 740 741The C<$whence> parameter takes one the usual values, namely SEEK_SET, 742SEEK_CUR or SEEK_END. 743 744Returns 1 on success, 0 on failure. 745 746=head2 binmode 747 748Usage is 749 750 $z->binmode 751 binmode $z ; 752 753This is a noop provided for completeness. 754 755=head2 opened 756 757 $z->opened() 758 759Returns true if the object currently refers to a opened file/buffer. 760 761=head2 autoflush 762 763 my $prev = $z->autoflush() 764 my $prev = $z->autoflush(EXPR) 765 766If the C<$z> object is associated with a file or a filehandle, this method 767returns the current autoflush setting for the underlying filehandle. If 768C<EXPR> is present, and is non-zero, it will enable flushing after every 769write/print operation. 770 771If C<$z> is associated with a buffer, this method has no effect and always 772returns C<undef>. 773 774B<Note> that the special variable C<$|> B<cannot> be used to set or 775retrieve the autoflush setting. 776 777=head2 input_line_number 778 779 $z->input_line_number() 780 $z->input_line_number(EXPR) 781 782Returns the current uncompressed line number. If C<EXPR> is present it has 783the effect of setting the line number. Note that setting the line number 784does not change the current position within the file/buffer being read. 785 786The contents of C<$/> are used to determine what constitutes a line 787terminator. 788 789=head2 fileno 790 791 $z->fileno() 792 fileno($z) 793 794If the C<$z> object is associated with a file or a filehandle, C<fileno> 795will return the underlying file descriptor. Once the C<close> method is 796called C<fileno> will return C<undef>. 797 798If the C<$z> object is associated with a buffer, this method will return 799C<undef>. 800 801=head2 close 802 803 $z->close() ; 804 close $z ; 805 806Closes the output file/buffer. 807 808For most versions of Perl this method will be automatically invoked if 809the IO::Uncompress::UnXz object is destroyed (either explicitly or by the 810variable with the reference to the object going out of scope). The 811exceptions are Perl versions 5.005 through 5.00504 and 5.8.0. In 812these cases, the C<close> method will be called automatically, but 813not until global destruction of all live objects when the program is 814terminating. 815 816Therefore, if you want your scripts to be able to run on all versions 817of Perl, you should call C<close> explicitly and not rely on automatic 818closing. 819 820Returns true on success, otherwise 0. 821 822If the C<AutoClose> option has been enabled when the IO::Uncompress::UnXz 823object was created, and the object is associated with a file, the 824underlying file will also be closed. 825 826=head2 nextStream 827 828Usage is 829 830 my $status = $z->nextStream(); 831 832Skips to the next compressed data stream in the input file/buffer. If a new 833compressed data stream is found, the eof marker will be cleared and C<$.> 834will be reset to 0. 835 836Returns 1 if a new stream was found, 0 if none was found, and -1 if an 837error was encountered. 838 839=head2 trailingData 840 841Usage is 842 843 my $data = $z->trailingData(); 844 845Returns the data, if any, that is present immediately after the compressed 846data stream once uncompression is complete. It only makes sense to call 847this method once the end of the compressed data stream has been 848encountered. 849 850This option can be used when there is useful information immediately 851following the compressed data stream, and you don't know the length of the 852compressed data stream. 853 854If the input is a buffer, C<trailingData> will return everything from the 855end of the compressed data stream to the end of the buffer. 856 857If the input is a filehandle, C<trailingData> will return the data that is 858left in the filehandle input buffer once the end of the compressed data 859stream has been reached. You can then use the filehandle to read the rest 860of the input file. 861 862Don't bother using C<trailingData> if the input is a filename. 863 864If you know the length of the compressed data stream before you start 865uncompressing, you can avoid having to use C<trailingData> by setting the 866C<InputLength> option in the constructor. 867 868=head1 Importing 869 870No symbolic constants are required by IO::Uncompress::UnXz at present. 871 872=over 5 873 874=item :all 875 876Imports C<unxz> and C<$UnXzError>. 877Same as doing this 878 879 use IO::Uncompress::UnXz qw(unxz $UnXzError) ; 880 881=back 882 883=head1 EXAMPLES 884 885=head1 SUPPORT 886 887General feedback/questions/bug reports should be sent to 888L<https://github.com/pmqs/IO-Compress-Lzma/issues> (preferred) or 889L<https://rt.cpan.org/Public/Dist/Display.html?Name=IO-Compress-Lzma>. 890 891=head1 SEE ALSO 892 893L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Compress::Lzip>, L<IO::Uncompress::UnLzip>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Compress::Zstd>, L<IO::Uncompress::UnZstd>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress> 894 895L<IO::Compress::FAQ|IO::Compress::FAQ> 896 897L<File::GlobMapper|File::GlobMapper>, L<Archive::Zip|Archive::Zip>, 898L<Archive::Tar|Archive::Tar>, 899L<IO::Zlib|IO::Zlib> 900 901=head1 AUTHOR 902 903This module was written by Paul Marquess, C<pmqs@cpan.org>. 904 905=head1 MODIFICATION HISTORY 906 907See the Changes file. 908 909=head1 COPYRIGHT AND LICENSE 910 911Copyright (c) 2005-2021 Paul Marquess. All rights reserved. 912 913This program is free software; you can redistribute it and/or 914modify it under the same terms as Perl itself. 915