SnappyCompressor (Apache Geode 1.15.4)

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 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(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

          @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`