IO-Compress-Lzf
view release on metacpan or search on metacpan
lib/IO/Compress/Lzf.pm view on Meta::CPAN
Defaults to 0.
=back
=head2 Oneshot Examples
Here are a few example that show the capabilities of the module.
=head3 Streaming
This very simple command line example demonstrates the streaming capabilities of the module.
The code reads data from STDIN, compresses it, and writes the compressed data to STDOUT.
$ echo hello world | perl -MIO::Compress::Lzf=lzf -e 'lzf \*STDIN => \*STDOUT' >output.lzf
The special filename "-" can be used as a standin for both C<\*STDIN> and C<\*STDOUT>,
so the above can be rewritten as
$ echo hello world | perl -MIO::Compress::Lzf=lzf -e 'lzf "-" => "-"' >output.lzf
=head3 Compressing a file from the filesystem
lib/IO/Compress/Lzf.pm view on Meta::CPAN
=item C<< Strict => 0|1 >>
This is a placeholder option.
=back
=head2 Examples
=head3 Streaming
This very simple command line example demonstrates the streaming capabilities
of the module. The code reads data from STDIN or all the files given on the
commandline, compresses it, and writes the compressed data to STDOUT.
use strict ;
use warnings ;
use IO::Compress::Lzf qw(lzf $LzfError) ;
my $z = IO::Compress::Lzf->new("-", Stream => 1)
or die "IO::Compress::Lzf failed: $LzfError\n";
( run in 0.251 second using v1.01-cache-2.11-cpan-4d50c553e7e )