voldemort.store.compress
Class NoopCompressionStrategy

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

public class NoopCompressionStrategy
extends java.lang.Object
implements CompressionStrategy

Implementation of CompressionStrategy that returns the original data unchanged. A typical use-case for this is not to compress the keys when using CompressingStore.


Constructor Summary
NoopCompressionStrategy()
           
 
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

NoopCompressionStrategy

public NoopCompressionStrategy()
Method Detail

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.

getType

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

Specified by:
getType in interface CompressionStrategy


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