mirror of
https://codeberg.org/scip/dbmdeep.git
synced 2025-12-17 20:51:02 +01:00
initial commit
This commit is contained in:
20
samples/zip.yaml
Normal file
20
samples/zip.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
perl: |
|
||||
use Compress::Zlib;
|
||||
%params = (
|
||||
filter_store_key => \&my_compress,
|
||||
filter_store_value => \&my_compress,
|
||||
filter_fetch_key => \&my_decompress,
|
||||
filter_fetch_value => \&my_decompress,
|
||||
);
|
||||
sub my_compress {
|
||||
my $s = shift;
|
||||
utf8::encode($s);
|
||||
return Compress::Zlib::memGzip( $s ) ;
|
||||
}
|
||||
sub my_decompress {
|
||||
my $s = Compress::Zlib::memGunzip( shift ) ;
|
||||
utf8::decode($s);
|
||||
return $s;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user