25 |
); |
); |
26 |
|
|
27 |
my $mount = { |
my $mount = { |
28 |
from => '/tmp/comp', |
from => shift @ARGV || '/tmp/comp', |
29 |
to => '/tmp/no-comp', |
to => shift @ARGV || '/tmp/no-comp', |
30 |
tmp => '/dev/shm/comp', |
tmp => shift @ARGV || '/dev/shm/comp', |
31 |
}; |
}; |
32 |
|
|
33 |
|
warn "mount $mount->{from} to $mount->{to} using $mount->{tmp} as cache\n"; |
34 |
|
|
35 |
my $skip_extensions_regex = qr/gz|gz%|\.(?:sw[a-z]|gif|png|jpeg|jpg|avi|rar|zip|bz2|tgz|avi|mpeg|mpg|tmp|temp)$/i; |
my $skip_extensions_regex = qr/gz|gz%|\.(?:sw[a-z]|gif|png|jpeg|jpg|avi|rar|zip|bz2|tgz|avi|mpeg|mpg|tmp|temp)$/i; |
36 |
|
|
37 |
# don't compress files smaller than this |
# don't compress files smaller than this |