[ 
https://issues.apache.org/jira/browse/LUCENE-4584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508270#comment-13508270
 ] 

Adrien Grand commented on LUCENE-4584:
--------------------------------------

bq. You wouldn't need static files if you compared output lengths

Even the output length depends on the endianess: LZ4 uses a hash table without 
collision resolution (it maps hash -> last offset that produced this hash) to 
find matchs of 4 consecutive bytes in the input bytes, and this hash function 
is not endian-neutral (it interprets the 4 bytes as an 32-bits int, multiplies 
it by a prime number and keeps the 12 first bits (13 if there are less than 
2^16 input bytes)), so the collisions won't be the same depending on the 
endianess and LZ4 won't find the same matchs.
                
> Compare the LZ4 implementation in Lucene against the original impl
> ------------------------------------------------------------------
>
>                 Key: LUCENE-4584
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4584
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>             Fix For: 4.1
>
>
> We should add tests to make sure that the LZ4 impl in Lucene compresses data 
> the exact same way as the original impl.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to