Re: [h2] Possible bug in LZF compression

2014-06-02 Thread Jan Kotek
Hi,

I confirm the issue is on my side. I made optimization in MapDB which causes 
the 
bug (replaced for loop copy with System.arrayCopy)

Thanks for help and sorry for false alarm.

Jan

On Wednesday, May 28, 2014 13:41:24 Thomas Mueller wrote:


Hi,


Yes, it looks like this doesn't affect H2. Maybe it is related to the changes 
to the 
LZF compressor in MapDB? My test case:


byte[] data = 
StringUtils.convertHexToBytes(00ef76fa135e7d216e829a53845a983469ac1e
4edb6120b79667d667e7d4f856010101010022bf4569010023002102
123eeaa90e2f5786ce028e60ec03702706dadecee373a90b09b88a99cc668f46ac33
58c8ea6433279c678846fb6e06eeccd82e2fe888f2ac203476d3918cd4057901
0038ff9e00be438253be4382530100109bf45901002300210
2123eeaa90e2f5786ce028e60ec03702706dadecee373a90b09b88a99cc668f46ac3
8bf80f10129594a7e949cc43c3bd6f8670ba5ab59874305f6839406738a9cf901
0038ff9e0081bd175381bd1753);
CompressLZF lzf = new CompressLZF();
byte[] out = new byte[data.length];
int len = lzf.compress(data, data.length, out, 0);
byte[] test = new byte[data.length];
lzf.expand(out, 0, len, test, 0, data.length);
System.out.println(StringUtils.convertBytesToHex(test));
System.out.println(Arrays.hashCode(data));
System.out.println(Arrays.hashCode(test));


Regards,
Thomas


On Tue, May 27, 2014 at 1:57 PM, Noel Grandin noelgran...@gmail.com[1] wrote:


I massaged your test case into a unit test for H2, and it seems to be working 
for us.

But maybe there is some more transformation that happens to the raw byte array 
before it hits the LZF compressor.






-- You received this message because you are subscribed to the Google Groups 
H2 
Database group.To unsubscribe from this group and stop receiving emails from 
it, 
send an email to h2-database+unsubscr...@googlegroups.com[2].To post to this 
group, send email to h2-database@googlegroups.com[3].Visit this group at 
http://groups.google.com/group/h2-database[4].For more options, visit 
https://groups.google.com/d/optout[5].




-- You received this message because you are subscribed to the Google Groups 
H2 
Database group.To unsubscribe from this group and stop receiving emails from 
it, 
send an email to h2-database+unsubscr...@googlegroups.com[6].To post to this 
group, send email to h2-database@googlegroups.com[3].Visit this group at 
http://groups.google.com/group/h2-database[4].For more options, visit 
https://groups.google.com/d/optout[5].






[1] mailto:noelgran...@gmail.com
[2] mailto:h2-database%2bunsubscr...@googlegroups.com
[3] mailto:h2-database@googlegroups.com
[4] http://groups.google.com/group/h2-database
[5] https://groups.google.com/d/optout
[6] mailto:h2-database+unsubscr...@googlegroups.com

-- 
You received this message because you are subscribed to the Google Groups H2 
Database group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] Possible bug in LZF compression

2014-05-27 Thread Jan Kotek
Hi,

MapDB uses LZF compression from H2 database. One of our users 
reported wrongly decompressed data:
https://github.com/jankotek/MapDB/issues/332[1] 

I have not checked yet if this bug affect H2 as well.
Wiil be back in a few days

All best,
Jan


[1] https://github.com/jankotek/MapDB/issues/332

-- 
You received this message because you are subscribed to the Google Groups H2 
Database group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Possible bug in LZF compression

2014-05-27 Thread Noel Grandin

I massaged your test case into a unit test for H2, and it seems to be working 
for us.

But maybe there is some more transformation that happens to the raw byte array 
before it hits the LZF compressor.

On 2014-05-27 13:46, Jan Kotek wrote:


MapDB uses LZF compression from H2 database. One of our users reported wrongly 
decompressed data:


--
You received this message because you are subscribed to the Google Groups H2 
Database group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.