Interface Compressor

All Known Implementing Classes:
AbstractLz4Compressor, Lz4Compressor, PureJavaLz4Compressor, SafeJavaLz4Compressor, SnappyCompressor

public interface Compressor
Interface for a compression codec.

Implementations must be thread-safe. A single Compressor instance is shared across all threads operating on a region. The simplest way to satisfy this requirement is to keep no mutable state in the implementation; for example, allocate any working buffers as local variables within each method call.

  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    compress(byte[] input)
    Compresses the input byte array.
    byte[]
    decompress(byte[] input)
    Decompresses a compressed byte array.
  • Method Details

    • compress

      byte[] compress(byte[] input)
      Compresses the input byte array.
      Parameters:
      input - The data to be compressed.
      Returns:
      A compressed version of the input parameter.
    • decompress

      byte[] decompress(byte[] input)
      Decompresses a compressed byte array.
      Parameters:
      input - A compressed byte array.
      Returns:
      an uncompressed version of compressed input byte array data.