voldemort.store.compress
Interface CompressionStrategy

All Known Implementing Classes:
GzipCompressionStrategy, LzfCompressionStrategy, NoopCompressionStrategy, SnappyCompressionStrategy, StreamCompressionStrategy

public interface CompressionStrategy

Implementations of this interface provide a strategy for compressing and uncompressing data.


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.
 

Method Detail

getType

java.lang.String getType()
The type of compression performed.


inflate

byte[] inflate(byte[] data)
               throws java.io.IOException
Uncompresses the data. The array received should not be modified, but it may be returned unchanged.

Parameters:
data - compressed data.
Returns:
uncompressed data.
Throws:
java.io.IOException - if there is an issue during the operation.

deflate

byte[] deflate(byte[] data)
               throws java.io.IOException
Compresses the data. The array received should not be modified, but it may be returned unchanged.

Parameters:
data - uncompressed data.
Returns:
compressed 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