Class SnappyCodec

java.lang.Object
org.apache.avro.file.Codec
org.apache.avro.file.SnappyCodec

public class SnappyCodec extends Codec
Implements Snappy compression and decompression.
  • Method Details

    • getName

      public String getName()
      Description copied from class: Codec
      Name of the codec; written to the file's metadata.
      Specified by:
      getName in class Codec
    • compress

      public ByteBuffer compress(ByteBuffer in) throws IOException
      Description copied from class: Codec
      Compresses the input data
      Specified by:
      compress in class Codec
      Throws:
      IOException
    • decompress

      public ByteBuffer decompress(ByteBuffer in) throws IOException
      Description copied from class: Codec
      Decompress the data
      Specified by:
      decompress in class Codec
      Throws:
      IOException
    • hashCode

      public int hashCode()
      Description copied from class: Codec
      Codecs must implement a hashCode() method that is consistent with equals().
      Specified by:
      hashCode in class Codec
    • equals

      public boolean equals(Object obj)
      Description copied from class: Codec
      Codecs must implement an equals() method. Two codecs, A and B are equal if: the result of A and B decompressing content compressed by A is the same AND the result of A and B decompressing content compressed by B is the same
      Specified by:
      equals in class Codec