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

Stu Hood commented on CASSANDRA-2398:
-------------------------------------

Planning to update the signatures to:
{code:java}
public ByteBuffer compress(int version, final List<ByteBuffer> from, ByteBuffer 
to)
public void decompress(int version, ByteBuffer from, List<ByteBuffer> to)
{code}
Which would make skip a native operation, and remove a lot of copies and object 
creation.

> Type specific compression
> -------------------------
>
>                 Key: CASSANDRA-2398
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2398
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 0.8 beta 1
>            Reporter: Stu Hood
>              Labels: compression
>         Attachments: 
> 0001-CASSANDRA-2398-Add-basic-type-specific-compression-to-.txt, 
> 0002-CASSANDRA-2398-LZF-for-AbstractType-base.txt
>
>
> Cassandra has a lot of locations that are ripe for type specific compression. 
> A short list:
> Indexes
>  * Keys compressed as BytesType, which could default to LZO/LZMA
>  * Offsets (delta and varint encoding)
>  * Column names added by 2319
> Data
>  * Keys, columns, timestamps: see 
> http://wiki.apache.org/cassandra/FileFormatDesignDoc
> A basic interface for type specific compression could be as simple as:
> {code:java}
> public void compress(int version, final List<ByteBuffer> from, DataOutput to) 
> throws IOException
> public void decompress(int version, DataInput from, List<ByteBuffer> to) 
> throws IOException
> public void skip(int version, DataInput from) throws IOException
> {code} 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to