com.esotericsoftware.kryo.compress
Class DeflateCompressor

java.lang.Object
  extended by com.esotericsoftware.kryo.Serializer
      extended by com.esotericsoftware.kryo.Compressor
          extended by com.esotericsoftware.kryo.compress.ByteArrayCompressor
              extended by com.esotericsoftware.kryo.compress.DeflateCompressor

public class DeflateCompressor
extends ByteArrayCompressor

Compresses and decompresses using the "deflate" algorithm.

Author:
Nathan Sweet

Field Summary
 
Fields inherited from class com.esotericsoftware.kryo.Compressor
bufferSize
 
Constructor Summary
DeflateCompressor(Serializer serializer)
           
DeflateCompressor(Serializer serializer, int bufferSize)
           
 
Method Summary
 void compress(byte[] inputBytes, int inputLength, java.nio.ByteBuffer outputBuffer)
          Implementations should read the specified number of input bytes and write compressed data to the output buffer.
 void decompress(byte[] inputBytes, int inputLength, java.nio.ByteBuffer outputBuffer)
          Implementations should read the specified number of input bytes and write decompressed data to the output bytes.
 
Methods inherited from class com.esotericsoftware.kryo.compress.ByteArrayCompressor
compress, decompress
 
Methods inherited from class com.esotericsoftware.kryo.Compressor
readObjectData, setCompress, setDecompress, writeObjectData
 
Methods inherited from class com.esotericsoftware.kryo.Serializer
isFinal, newInstance, readObject, setCanBeNull, writeObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeflateCompressor

public DeflateCompressor(Serializer serializer)

DeflateCompressor

public DeflateCompressor(Serializer serializer,
                         int bufferSize)
Method Detail

compress

public void compress(byte[] inputBytes,
                     int inputLength,
                     java.nio.ByteBuffer outputBuffer)
Description copied from class: ByteArrayCompressor
Implementations should read the specified number of input bytes and write compressed data to the output buffer.

Specified by:
compress in class ByteArrayCompressor
outputBuffer - A non-direct buffer.

decompress

public void decompress(byte[] inputBytes,
                       int inputLength,
                       java.nio.ByteBuffer outputBuffer)
Description copied from class: ByteArrayCompressor
Implementations should read the specified number of input bytes and write decompressed data to the output bytes.

Specified by:
decompress in class ByteArrayCompressor
outputBuffer - A non-direct buffer.


Copyright © 2011. All Rights Reserved.