SnappyCompressor (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.compression, class: SnappyCompressor

Package org.apache.geode.compression

# Class SnappyCompressor

java.lang.Object
org.apache.geode.compression.SnappyCompressor

All Implemented Interfaces:
  `Serializable`, `Compressor`

public class SnappyCompressor extends Object implements Compressor, Serializable
An implementation of `Compressor` for Google's Snappy compression codec. Utilizes the java-snappy wrapper.

Since:
  GemFire 8.0
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SnappyCompressor()`
  Create a new instance of the SnappyCompressor.

- ## 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.
  `boolean`
  `equals(Object other)`
  `static SnappyCompressor`
  `getDefaultInstance()`
  Deprecated.
  As of Geode 1.0, getDefaultInstance is deprecated.
  `int`
  `hashCode()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SnappyCompressor

    public SnappyCompressor()
    Create a new instance of the SnappyCompressor.

- ## Method Details

  - ### getDefaultInstance

    @Deprecated public static SnappyCompressor getDefaultInstance()
    Deprecated.
    As of Geode 1.0, getDefaultInstance is deprecated. Use constructor instead.
    Get the single, default instance of the SnappyCompressor.
    Returns:
      the single, default instance of the SnappyCompressor

  - ### compress

    public byte[] compress(byte[] input)
    Description copied from interface: `Compressor`
    Compresses the input byte array.
    Specified by:
      `compress` in interface `Compressor`
    Parameters:
      `input` - The data to be compressed.
    Returns:
      A compressed version of the input parameter.

  - ### decompress

    public byte[] decompress(byte[] input)
    Description copied from interface: `Compressor`
    Decompresses a compressed byte array.
    Specified by:
      `decompress` in interface `Compressor`
    Parameters:
      `input` - A compressed byte array.
    Returns:
      an uncompressed version of compressed input byte array data.

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object other)
    Overrides:
      `equals` in class `Object`