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 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 java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object