PerlIO::via::Bzip2(3) User Contributed Perl Documentation PerlIO::via::Bzip2(3)NAME
PerlIO::via::Bzip2 - PerlIO layer for Bzip2 (de)compression
SYNOPSIS
use 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;
DESCRIPTION
This module implements a PerlIO layer which will let you handle bzip2 compressed files transparently.
Class Methods
level([$level])
level sets or returns the compression level of the bzip2 library. It ranges from 1 (least compression, most efficient memory use) to 9
(best compression, most memory usage).
This parameter can also be set during using library import, using "use PerlIO::via::Bzip2 level => $level".
BUGS
Using binmode() on an opened file for compression will pop (remove) the layer.
PREREQUISITES
This module requires Compress::Bzip2 version 1.03.
SEE ALSO
PerlIO::via, Compress::Bzip2
AUTHOR
Arjen Laarhoven, <arjen@cpan.org>
COPYRIGHT AND LICENSE
Copyright (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.
perl v5.16.2 2005-03-04 PerlIO::via::Bzip2(3)
Check Out this Related Man Page
PerlIO::via::QuotedPrint(3pm) Perl Programmers Reference Guide PerlIO::via::QuotedPrint(3pm)NAME
PerlIO::via::QuotedPrint - PerlIO layer for quoted-printable strings
SYNOPSIS
use PerlIO::via::QuotedPrint;
open( my $in, '<:via(QuotedPrint)', 'file.qp' )
or die "Can't open file.qp for reading: $!
";
open( my $out, '>:via(QuotedPrint)', 'file.qp' )
or die "Can't open file.qp for writing: $!
";
VERSION
This documentation describes version 0.07.
DESCRIPTION
This module implements a PerlIO layer that works on files encoded in the quoted-printable format. It will decode from quoted-printable
while reading from a handle, and it will encode as quoted-printable while writing to a handle.
REQUIRED MODULES
MIME::QuotedPrint (any)
SEE ALSO
PerlIO::via, MIME::QuotedPrint, PerlIO::via::Base64, PerlIO::via::MD5, PerlIO::via::StripHTML, PerlIO::via::Rotate.
ACKNOWLEDGEMENTS
Based on example that was initially added to MIME::QuotedPrint.pm for the 5.8.0 distribution of Perl.
COPYRIGHT
Copyright (c) 2002, 2003, 2004, 2012 Elizabeth Mattijsen. All rights reserved. This library is free software; you can redistribute it
and/or modify it under the same terms as Perl itself.
perl v5.18.2 2013-11-04 PerlIO::via::QuotedPrint(3pm)
I've noticed bzip2 gives a little bit better compression than gzip. So...I'm curious...what's gives the best compression out of all the compression utilities?
Thanks! (6 Replies)
Hi,
I have a question about finding the compression ratios of a zip (bzip2) file.I have written a procedure which upon certain criteria tar's and bzip2 certain directories and moves them to a near line storage.
Yesterday I happened to stumble upon it. The procedure has tared and bzipped 6... (3 Replies)
Dear Experts,
I am new to this forum. Thank you for moderator to allow me to join.
I have a question about automatic compression using sh and crontab
on an application which runs on the Suse Linux Server 11 SP4.
My question is how to compress every file in a directory into its own tar... (5 Replies)