Subject: | 60380_Bug report |
Date: | Mon, 22 Sep 2014 14:01:05 +0200 |
To: | bug-Compress-LZ4 [...] rt.cpan.org |
From: | rch <rch [...] skynet.be> |
===============================================
Bruxelles
2014_09_22
To bug-Compress-LZ4@rt.cpan.org.
My mozilla firefox bookmarks have suddenly switched to
format .jsonlz4 format. So I am trying to get info
out of them using Compress::LZ4.
But for even a small (142 kiB) file I get message
<<Out of memory!>>
Further details and demo code below the line.
What am I doing wrong?
Thank you in advance for your help.
Richard H
===============================================
email rch@skynet.be
===============================================
Distribution name and version:
Compress::LZ4
$VERSION '0.20'
Perl version:
perl 5, version 14, subversion 2 (v5.14.2)
built for i686-linux-gnu-thread-multi-64int
Operating System vendor and version:
Linux Ubuntu 3.2.0-68-generic-pae
#102-Ubuntu SMP Tue Aug 12 22:23:54 UTC 2014 i686 i686 i386
GNU/Linux
My operating environment:
Memory 985MiB, of which 645MiB are in use
I've read https://rt.cpan.org/Public/Bug/Display.html?id=92825
but its all above my head.
I'm only a poor botanist ...
Demo code:
use strict;
use Carp;
use File::Slurp;
use Compress::LZ4;
# 1. Slurp the encoded bookmark *.jsonlz4 file
my $infile =
"/home/rch/.mozilla/firefox/1oj9bxa6.default/bookmarkbackups/bookmarks-2014-09-22_751_CmFFTpPHaKIDCdLOKrLuHQ==.jsonlz4";
my $lz4_encoded_text = read_file( $infile, binmode =>
':raw' );
unless( $lz4_encoded_text ){
croak "Ohhh Problem stage 1 read_file failed\n\tcroaked";
}
# 2. Uncompress the *.jsonlz4 bytes
my $utf8_encoded_json_text = lz4_uncompress($lz4_encoded_text);
unless($utf8_encoded_json_text){
croak "ohh decompress failed\n\tCroaked";
}
# Never get to here; just get the message
# Out of memory!
Show quoted text
-------- End of Original Message --------
--
===============================================
82 AVENUE WALCKIERS B-1160 AUDERGHEM BELGIQUE
tel +32 (0)2 660 52 23
email rch@skynet.be
===============================================