org.elasticsearch.common.compress
Interface Compressor

All Known Implementing Classes:
LZFCompressor, SnappyCompressor, UnavailableSnappyCompressor, XerialSnappyCompressor

public interface Compressor


Method Summary
 byte[] compress(byte[] data, int offset, int length)
          Compresses the provided data, data can be detected as compressed using isCompressed(byte[], int, int).
 void configure(Settings settings)
           
 CompressedIndexInput indexInput(org.apache.lucene.store.IndexInput in)
           
 CompressedIndexOutput indexOutput(org.apache.lucene.store.IndexOutput out)
           
 boolean isCompressed(byte[] data, int offset, int length)
           
 boolean isCompressed(BytesReference bytes)
           
 boolean isCompressed(org.jboss.netty.buffer.ChannelBuffer buffer)
           
 boolean isCompressed(org.apache.lucene.store.IndexInput in)
           
 CompressedStreamInput streamInput(StreamInput in)
           
 CompressedStreamOutput streamOutput(StreamOutput out)
           
 String type()
           
 byte[] uncompress(byte[] data, int offset, int length)
          Uncompress the provided data, data can be detected as compressed using isCompressed(byte[], int, int).
 

Method Detail

type

String type()

configure

void configure(Settings settings)

isCompressed

boolean isCompressed(BytesReference bytes)

isCompressed

boolean isCompressed(byte[] data,
                     int offset,
                     int length)

isCompressed

boolean isCompressed(org.jboss.netty.buffer.ChannelBuffer buffer)

isCompressed

boolean isCompressed(org.apache.lucene.store.IndexInput in)
                     throws IOException
Throws:
IOException

uncompress

byte[] uncompress(byte[] data,
                  int offset,
                  int length)
                  throws IOException
Uncompress the provided data, data can be detected as compressed using isCompressed(byte[], int, int).

Throws:
IOException

compress

byte[] compress(byte[] data,
                int offset,
                int length)
                throws IOException
Compresses the provided data, data can be detected as compressed using isCompressed(byte[], int, int).

Throws:
IOException

streamInput

CompressedStreamInput streamInput(StreamInput in)
                                  throws IOException
Throws:
IOException

streamOutput

CompressedStreamOutput streamOutput(StreamOutput out)
                                    throws IOException
Throws:
IOException

indexInput

CompressedIndexInput indexInput(org.apache.lucene.store.IndexInput in)
                                throws IOException
Throws:
IOException

indexOutput

CompressedIndexOutput indexOutput(org.apache.lucene.store.IndexOutput out)
                                  throws IOException
Throws:
IOException


Copyright © 2009-2012. All Rights Reserved.