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

Adrien Grand commented on LUCENE-4643:
--------------------------------------

All bits are currently used (one to say whether the minValue is 0 or not and 7 
for the number of bitsPerValue (0 <= bpv <= 64, 0 means all values equal, 
similarly to the block PF). But maybe we could:
 1. add a constructor argument to say that all values are positive, and it 
won't zig-zag encode,
 2. or disable either the 0 or the 64 bits per value cases and add a sign bit?

I think the first option is better?
                
> PackedInts: convenience classes to write blocks of packed ints
> --------------------------------------------------------------
>
>                 Key: LUCENE-4643
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4643
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-4643.patch, LUCENE-4643.patch
>
>
> It is often useful to divide a packed stream into fixed blocks which are all 
> compressed independently:
>  * if your sequence of ints is very large, you won't have to buffer 
> everything into memory to compute the required number of bits per value,
>  * the compression ratio will be better in case of rare extreme values.
> The only drawback compared to the original PackedInts API is that the stream 
> cannot be directly used to deserialize a random-access PackedInts.Reader (but 
> for sequential access, this is just fine).

--
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