Compare commits

..

No commits in common. "4e43dcff31f174667d3b1f42feef74cf3f25c1da" and "ac69039180ad232a5055562cbcb180cc768b053e" have entirely different histories.

2 changed files with 37 additions and 31 deletions

52
arclog
View File

@ -1620,7 +1620,7 @@ sub open_write : method {
}
($self->{"file"}, $self->{"FH"}) = ($file, $FH);
print STDERR " Attaching file with IO::Compress::Gzip ... " if $VERBOSE > 2;
$self->{"gz"} = IO::Compress::Gzip->new($FH, -Level => 9)
$self->{"gz"} = IO::Compress::Gzip->new($FH)
or die "$THIS_FILE: $file: $IO::Compress::Gzip::GzipError";
print STDERR "done\n" if $VERBOSE > 2;
return;
@ -1665,7 +1665,7 @@ sub open_append : method {
or die "$THIS_FILE: tempfile: $IO::Uncompress::Gunzip::GunzipError";
print STDERR "done\n" if $VERBOSE > 2;
print STDERR " Attaching file with IO::Compress::Gzip ... " if $VERBOSE > 2;
$gz = IO::Compress::Gzip->new($FH, -Level => 9)
$gz = IO::Compress::Gzip->new($FH)
or die "$THIS_FILE: $file: $IO::Compress::Gzip::GzipError";
print STDERR "done\n" if $VERBOSE > 2;
@ -1682,7 +1682,7 @@ sub open_append : method {
# A whole new file
} else {
print STDERR " Attaching file with IO::Compress::Gzip ... " if $VERBOSE > 2;
$gz = IO::Compress::Gzip->new($FH, -Level => 9)
$gz = IO::Compress::Gzip->new($FH)
or die "$THIS_FILE: $file: $IO::Compress::Gzip::GzipError";
print STDERR "done\n" if $VERBOSE > 2;
}
@ -1692,7 +1692,9 @@ sub open_append : method {
}
# Read a line from the I/O stream
sub readline : method { $_[0]->{"gz"}->getline; }
sub readline : method {
return $_[0]->{"gz"}->getline();
}
# Output data to the I/O stream
sub write : method {
@ -1722,7 +1724,7 @@ sub close : method {
# Create empty compressed content
print STDERR " Applying empty compressed content ... " if $VERBOSE > 2;
$_ = IO::Compress::Gzip->new($FH, -Level => 9)
$_ = IO::Compress::Gzip->new($FH, Append => 0)
or die "$THIS_FILE: $file: $IO::Compress::Gzip::GzipError";
$_->close or die "$THIS_FILE: $file: $IO::Compress::Gzip::GzipError";
undef $_;
@ -2075,7 +2077,7 @@ sub open_write : method {
}
($self->{"file"}, $self->{"FH"}) = ($file, $FH);
print STDERR " Attaching file with IO::Compress::Bzip2 ... " if $VERBOSE > 2;
$self->{"bz"} = IO::Compress::Bzip2->new($FH, BlockSize100K => 9)
$self->{"bz"} = IO::Compress::Bzip2->new($FH)
or die "$THIS_FILE: $file: $IO::Compress::Bzip2::Bzip2Error";
print STDERR "done\n" if $VERBOSE > 2;
return;
@ -2120,7 +2122,7 @@ sub open_append : method {
or die "$THIS_FILE: $file: $IO::Uncompress::Bunzip2::Bunzip2Error";
print STDERR "done\n" if $VERBOSE > 2;
print STDERR " Attaching file with IO::Compress::Bzip2 ... " if $VERBOSE > 2;
$bz = IO::Compress::Bzip2->new($FH, BlockSize100K => 9)
$bz = IO::Compress::Bzip2->new($FH)
or die "$THIS_FILE: $file: $IO::Compress::Bzip2::Bzip2Error";
print STDERR "done\n" if $VERBOSE > 2;
@ -2137,7 +2139,7 @@ sub open_append : method {
# A whole new file
} else {
print STDERR " Attaching file with IO::Compress::Bzip2 ... " if $VERBOSE > 2;
$bz = IO::Compress::Bzip2->new($FH, BlockSize100K => 9)
$bz = IO::Compress::Bzip2->new($FH)
or die "$THIS_FILE: $file: $IO::Compress::Bzip2::Bzip2Error";
print STDERR "done\n" if $VERBOSE > 2;
}
@ -2147,7 +2149,9 @@ sub open_append : method {
}
# Read a line from the I/O stream
sub readline : method { $_[0]->{"bz"}->getline; }
sub readline : method {
return $_[0]->{"bz"}->getline();
}
# Output data to the I/O stream
sub write : method {
@ -2177,7 +2181,7 @@ sub close : method {
# Create empty compressed content
print STDERR " Applying empty compressed content ... " if $VERBOSE > 2;
$_ = IO::Compress::Bzip2->new($FH, BlockSize100K => 9)
$_ = IO::Compress::Bzip2->new($FH)
or die "$THIS_FILE: $file: $IO::Compress::Bzip2::Bzip2Error";
$_->close or die "$THIS_FILE: $file: $IO::Compress::Bzip2::Bzip2Error";
undef $_;
@ -2281,7 +2285,7 @@ sub open_write : method {
($self->{"file"}, $self->{"FH"}) = ($file, $FH);
$EXEC = where_is "bzip2" if !defined $EXEC;
@_ = ($EXEC, "-c9f");
@_ = ($EXEC, "-9f");
@_ = map "\"$_\"", @_ if $^O eq "MSWin32";
$CMD = join " ", @_;
print STDERR " Starting $CMD to file ... " if $VERBOSE > 2;
@ -2352,7 +2356,7 @@ sub open_append : method {
open STDIN, "<&", $STDIN or die "$THIS_FILE: STDIN: $!";
print STDERR "done\n" if $VERBOSE > 2;
@_ = ($EXEC, "-c9f");
@_ = ($EXEC, "-9f");
@_ = map "\"$_\"", @_ if $^O eq "MSWin32";
$CMD = join " ", @_;
print STDERR " Starting $CMD to file ... " if $VERBOSE > 2;
@ -2380,7 +2384,7 @@ sub open_append : method {
# A whole new file
} else {
@_ = ($EXEC, "-c9f");
@_ = ($EXEC, "-9f");
@_ = map "\"$_\"", @_ if $^O eq "MSWin32";
$CMD = join " ", @_;
print STDERR " Starting $CMD to file ... " if $VERBOSE > 2;
@ -2440,7 +2444,7 @@ sub close : method {
# Create empty compressed content
print STDERR " Applying empty compressed content ... " if $VERBOSE > 2;
$EXEC = where_is "bzip2" if !defined $EXEC;
@_ = ($EXEC, "-c9f");
@_ = ($EXEC, "-9f");
@_ = map "\"$_\"", @_ if $^O eq "MSWin32";
$CMD = join " ", @_;
# Redirect STDOUT to $FH
@ -2531,7 +2535,7 @@ sub open_write : method {
}
($self->{"file"}, $self->{"FH"}) = ($file, $FH);
print STDERR " Attaching file with IO::Compress::Xz ... " if $VERBOSE > 2;
$self->{"xz"} = IO::Compress::Xz->new($FH, Extreme => 1)
$self->{"xz"} = IO::Compress::Xz->new($FH)
or die "$THIS_FILE: $file: $IO::Compress::Xz::XzError";
print STDERR "done\n" if $VERBOSE > 2;
return;
@ -2576,7 +2580,7 @@ sub open_append : method {
or die "$THIS_FILE: tempfile: $IO::Uncompress::UnXz::UnXzError";
print STDERR "done\n" if $VERBOSE > 2;
print STDERR " Attaching file with IO::Compress::Xz ... " if $VERBOSE > 2;
$xz = IO::Compress::Xz->new($FH, Extreme => 1)
$xz = IO::Compress::Xz->new($FH)
or die "$THIS_FILE: $file: $IO::Compress::Xz::XzError";
print STDERR "done\n" if $VERBOSE > 2;
@ -2593,7 +2597,7 @@ sub open_append : method {
# A whole new file
} else {
print STDERR " Attaching file with IO::Compress::Xz ... " if $VERBOSE > 2;
$xz = IO::Compress::Xz->new($FH, Extreme => 1)
$xz = IO::Compress::Xz->new($FH)
or die "$THIS_FILE: $file: $IO::Compress::Xz::XzError";
print STDERR "done\n" if $VERBOSE > 2;
}
@ -2603,7 +2607,9 @@ sub open_append : method {
}
# Read a line from the I/O stream
sub readline : method { $_[0]->{"xz"}->getline; }
sub readline : method {
return $_[0]->{"xz"}->getline();
}
# Output data to the I/O stream
sub write : method {
@ -2633,7 +2639,7 @@ sub close : method {
# Create empty compressed content
print STDERR " Applying empty compressed content ... " if $VERBOSE > 2;
$_ = IO::Compress::Xz->new($FH, Extreme => 1)
$_ = IO::Compress::Xz->new($FH, Append => 0)
or die "$THIS_FILE: $file: $IO::Compress::Xz::XzError";
$_->close or die "$THIS_FILE: $file: $IO::Compress::Xz::XzError";
undef $_;
@ -2737,7 +2743,7 @@ sub open_write : method {
($self->{"file"}, $self->{"FH"}) = ($file, $FH);
$EXEC = where_is "xz" if !defined $EXEC;
@_ = ($EXEC, "-c9f");
@_ = ($EXEC, "-9f");
@_ = map "\"$_\"", @_ if $^O eq "MSWin32";
$CMD = join " ", @_;
print STDERR " Starting $CMD to file ... " if $VERBOSE > 2;
@ -2808,7 +2814,7 @@ sub open_append : method {
open STDIN, "<&", $STDIN or die "$THIS_FILE: STDIN: $!";
print STDERR "done\n" if $VERBOSE > 2;
@_ = ($EXEC, "-c9f");
@_ = ($EXEC, "-9f");
@_ = map "\"$_\"", @_ if $^O eq "MSWin32";
$CMD = join " ", @_;
print STDERR " Starting $CMD to file ... " if $VERBOSE > 2;
@ -2836,7 +2842,7 @@ sub open_append : method {
# A whole new file
} else {
@_ = ($EXEC, "-c9f");
@_ = ($EXEC, "-9f");
@_ = map "\"$_\"", @_ if $^O eq "MSWin32";
$CMD = join " ", @_;
print STDERR " Starting $CMD to file ... " if $VERBOSE > 2;
@ -2896,7 +2902,7 @@ sub close : method {
# Create empty compressed content
print STDERR " Applying empty compressed content ... " if $VERBOSE > 2;
$EXEC = where_is "xz" if !defined $EXEC;
@_ = ($EXEC, "-c9f");
@_ = ($EXEC, "-9f");
@_ = map "\"$_\"", @_ if $^O eq "MSWin32";
$CMD = join " ", @_;
# Redirect STDOUT to $FH

View File

@ -241,7 +241,7 @@ sub read_file($) {
} else {
my ($PH, $CMD);
$CMD = where_is "gzip";
$CMD = "\"$CMD\" -cdf \"$file\"";
$CMD = "\"$CMD\" -cd \"$file\"";
open $PH, "$CMD |" or die this_file . ": $CMD: $!";
$content = join "", <$PH>;
close $PH or die this_file . ": $CMD: $!";
@ -264,7 +264,7 @@ sub read_file($) {
} else {
my ($PH, $CMD);
$CMD = where_is "bzip2";
$CMD = "\"$CMD\" -cdf \"$file\"";
$CMD = "bzip2 -cd \"$file\"";
open $PH, "$CMD |" or die this_file . ": $CMD: $!";
$content = join "", <$PH>;
close $PH or die this_file . ": $CMD: $!";
@ -287,7 +287,7 @@ sub read_file($) {
} else {
my ($PH, $CMD);
$CMD = where_is "xz";
$CMD = "\"$CMD\" -cdf \"$file\"";
$CMD = "xz -cd \"$file\"";
open $PH, "$CMD |" or die this_file . ": $CMD: $!";
$content = join "", <$PH>;
close $PH or die this_file . ": $CMD: $!";
@ -333,7 +333,7 @@ sub write_file($$) {
# IO::Compress::Gzip
if (eval { require IO::Compress::Gzip; 1; }) {
my $gz;
$gz = IO::Compress::Gzip->new($file, -Level => 9)
$gz = IO::Compress::Gzip->new($file)
or die this_file . ": $file: $IO::Compress::Gzip::GzipError";
($gz->write($content) == length $content)
or die this_file . ": $file: $IO::Compress::Gzip::GzipError";
@ -356,7 +356,7 @@ sub write_file($$) {
# IO::Compress::Bzip2
if (eval { require IO::Compress::Bzip2; 1; }) {
my $bz;
$bz = IO::Compress::Bzip2->new($file, BlockSize100K => 9)
$bz = IO::Compress::Bzip2->new($file)
or die this_file . ": $file: $IO::Compress::Bzip2::Bzip2Error";
($bz->write($content) == length $content)
or die this_file . ": $file: $IO::Compress::Bzip2::Bzip2Error";
@ -367,7 +367,7 @@ sub write_file($$) {
} else {
my ($PH, $CMD);
$CMD = where_is "bzip2";
$CMD = "\"$CMD\" -c9f > \"$file\"";
$CMD = "\"$CMD\" -9f > \"$file\"";
open $PH, "| $CMD" or die this_file . ": $CMD: $!";
print $PH $content or die this_file . ": $CMD: $!";
close $PH or die this_file . ": $CMD: $!";
@ -379,7 +379,7 @@ sub write_file($$) {
# IO::Compress::Xz
if (eval { require IO::Compress::Xz; 1; }) {
my $xz;
$xz = IO::Compress::Xz->new($file, Extreme => 1)
$xz = IO::Compress::Xz->new($file)
or die this_file . ": $file: $IO::Compress::Xz::XzError";
($xz->write($content) == length $content)
or die this_file . ": $file: $IO::Compress::Xz::XzError";
@ -390,7 +390,7 @@ sub write_file($$) {
} else {
my ($PH, $CMD);
$CMD = where_is "xz";
$CMD = "\"$CMD\" -c9f > \"$file\"";
$CMD = "\"$CMD\" -9f > \"$file\"";
open $PH, "| $CMD" or die this_file . ": $CMD: $!";
print $PH $content or die this_file . ": $CMD: $!";
close $PH or die this_file . ": $CMD: $!";