voldemort.store.compress
Class LzfCompressionStrategy

java.lang.Object
  extended by voldemort.store.compress.LzfCompressionStrategy
All Implemented Interfaces:
CompressionStrategy

public class LzfCompressionStrategy
extends java.lang.Object
implements CompressionStrategy

Implementation of CompressionStrategy for the LZF format. LZF is optimized for speed.


Constructor Summary
LzfCompressionStrategy()
           
 
Method Summary
 byte[] deflate(byte[] data)
          Compresses the data.
 java.lang.String getType()
          The type of compression performed.
 byte[] inflate(byte[] data)
          Uncompresses the data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LzfCompressionStrategy

public LzfCompressionStrategy()
Method Detail

getType

public java.lang.String getType()
Description copied from interface: CompressionStrategy
The type of compression performed.

Specified by:
getType in interface CompressionStrategy

deflate

public byte[] deflate(byte[] data)
               throws java.io.IOException
Description copied from interface: CompressionStrategy
Compresses the data. The array received should not be modified, but it may be returned unchanged.

Specified by:
deflate in interface CompressionStrategy
Parameters:
data - uncompressed data.
Returns:
compressed data.
Throws:
java.io.IOException - if there is an issue during the operation.

inflate

public byte[] inflate(byte[] data)
               throws java.io.IOException
Description copied from interface: CompressionStrategy
Uncompresses the data. The array received should not be modified, but it may be returned unchanged.

Specified by:
inflate in interface CompressionStrategy
Parameters:
data - compressed data.
Returns:
uncompressed data.
Throws:
java.io.IOException - if there is an issue during the operation.


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu