--- a/lib/Imager.pm Wed Aug 17 12:10:51 2011 +0200
+++ b/lib/Imager.pm Wed Aug 17 16:16:23 2011 +0200
@@ -5,11 +5,22 @@
use IO::Uncompress::Gunzip qw(gunzip $GunzipError);
use autodie qw(:all);
+our $VERSION = "0.1";
+
use constant CIPHER => "aes-128-cbc";
+sub get_file {
+ my ($base) = @_;
+ foreach (map { "$base$_" } "", qw/.gz .x .gz.x/) {
+ return $_ if -f;
+ }
+}
+
sub get_block {
my ($file, $buffer) = @_;
+ $file = get_file($1) if $file =~ /(.*)\*$/;
+
given ($file) {
when (/\.gz\.x$/) {
open(my $fh => "openssl @{[CIPHER]} -d -pass $::o{pass} -in $file|");