SnappyCompressor (Apache Geode 1.6.0)
Date: 2018-04-23

org.apache.geode.compression

## Class SnappyCompressor

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

- All Implemented Interfaces:
    java.io.Serializable, Compressor

      public class SnappyCompressor
      extends java.lang.Object
      implements Compressor, java.io.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 and Description
    `SnappyCompressor()` Create a new instance of the SnappyCompressor.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `compress(byte[] input)` Compresses the input byte array.
    `byte[]` | `decompress(byte[] input)` Decompresses a compressed byte array.
    `boolean` | `equals(java.lang.Object other)`
    `static SnappyCompressor` | `getDefaultInstance()` Deprecated. As of Geode 1.0, getDefaultInstance is deprecated. Use constructor instead.
    `int` | `hashCode()`

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

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

- - ### Constructor Detail

    - #### SnappyCompressor

          public SnappyCompressor()

      Create a new instance of the SnappyCompressor.

  - ### Method Detail

    - #### getDefaultInstance

          public static SnappyCompressor getDefaultInstance()

      Deprecated. As of Geode 1.0, getDefaultInstance is deprecated. Use constructor instead.
      Get 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 `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object other)

      Overrides:
        `equals` in class `java.lang.Object`