PerlIO::via::xz - PerlIO layer for XZ (de)compression
use PerlIO::via::XZ; # Read a xz compressed file from disk. open my $fh, "<:via(xz)", "compressed_file"; my $uncompressed_data = <$fh>; # Compress data on-the-fly to a xz compressed file on disk. open my $fh, ">:via(xz)", "compressed_file"; print { $fh } $uncompressed_data;
This module implements a PerlIO layer which will let you handle xz compressed files transparently.
Using binmode on an opened file for compression will pop (remove) the layer.
binmode
This module requires IO::Compress::Xz and IO::Uncompress::UnXz.
PerlIO::via, IO::Compress::Xz, IO::Uncompress::UnXz.
H.Merijn Brand <hmbrand@cpan.org>
Copyright (C) 2020-2023 by H.Merijn Brand
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install PerlIO::via::xz, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PerlIO::via::xz
CPAN shell
perl -MCPAN -e shell install PerlIO::via::xz
For more information on module installation, please visit the detailed CPAN module installation guide.