NAME

PerlIO::via::Bzip2 - PerlIO::via layer for Bzip2 (de)compression

SYNOPSIS

# 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;

DESCRIPTION

This module implements a PerlIO layer which will let you handle bzip2 compressed files transparently.

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

AUTHOR

Arjen Laarhoven, <arjen@cpan.org<gt>

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.