org.apache.avro.file

## Class XZCodec

- java.lang.Object
- - org.apache.avro.file.Codec
  - - org.apache.avro.file.XZCodec

-     public class XZCodec
      extends Codec

  Implements xz compression and decompression.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_COMPRESSION`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XZCodec(int compressionLevel)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ByteBuffer` | `compress(ByteBuffer data)` Compresses the input data
    `ByteBuffer` | `decompress(ByteBuffer data)` Decompress the data
    `boolean` | `equals(Object obj)` Codecs must implement an equals() method.
    `String` | `getName()` Name of the codec; written to the file's metadata.
    `int` | `hashCode()` Codecs must implement a hashCode() method that is consistent with equals().
    `String` | `toString()`

    - ### Methods inherited from class org.apache.avro.file.Codec

      `computeOffset`

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

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

- - ### Field Detail

    - #### DEFAULT_COMPRESSION

          public static final int DEFAULT_COMPRESSION

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### XZCodec

          public XZCodec(int compressionLevel)

  - ### Method Detail

    - #### 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 data)
                              throws IOException

      Description copied from class: `Codec`
      Compresses the input data
      Specified by:
        `compress` in class `Codec`
      Throws:
        `IOException`

    - #### decompress

          public ByteBuffer decompress(ByteBuffer data)
                                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`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Codec`

Copyright © 2009–2024 The Apache Software Foundation. All rights reserved.