![]() |
![]()
| ![]() |
![]()
NAMEPerlIO::via::Bzip2 - PerlIO layer for Bzip2 (de)compression SYNOPSISuse PerlIO::via::Bzip2; # or use PerlIO::via::Bzip2 level => 9; # Maximum compression # Read a bzip2 compressed file from disk. open(my $fh, "<:via(Bzip2)", "compressed_file"); my $uncompressed_data = <$fh>; # Compress data on-the-fly to a bzip2 compressed file on disk. open(my $fh, ">:via(Bzip2)", "compressed_file"); print {$fh} $uncompressed_data; # Set compression level PerlIO::via::Bzip2->level(5); open(my $fh, ">:via(Bzip2)", "compressed_file"); print {$fh} $uncompressed_data; DESCRIPTIONThis module implements a PerlIO layer which will let you handle bzip2 compressed files transparently. Class Methods
BUGSUsing binmode() on an opened file for compression will pop (remove) the layer. PREREQUISITESThis module requires Compress::Bzip2 version 1.03. SEE ALSOPerlIO::via, Compress::Bzip2 AUTHORArjen Laarhoven, <arjen@cpan.org> COPYRIGHT AND LICENSECopyright (C) 2005 by Arjen Laarhoven This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|