AircompressorCodec (ORC Core 1.6.5 API)
Date: 2020-10-01

org.apache.orc.impl

## Class AircompressorCodec

- java.lang.Object
- - org.apache.orc.impl.AircompressorCodec

- All Implemented Interfaces:
    Closeable, AutoCloseable, CompressionCodec
  Direct Known Subclasses:
    SnappyCodec

      public class AircompressorCodec
      extends Object
      implements CompressionCodec

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.orc.CompressionCodec

      `CompressionCodec.DataKind, CompressionCodec.Options, CompressionCodec.SpeedModifier`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Return the codec to the pool.
    `boolean` | `compress(ByteBuffer in, ByteBuffer out, ByteBuffer overflow, CompressionCodec.Options options)` Compress the in buffer to the out buffer.
    `void` | `decompress(ByteBuffer in, ByteBuffer out)` Decompress the in buffer to the out buffer.
    `void` | `destroy()` Closes the codec, releasing the resources.
    `protected static byte[]` | `getBuffer(int size)`
    `CompressionCodec.Options` | `getDefaultOptions()` Get the default options for this codec.
    `CompressionKind` | `getKind()` Get the compression kind.
    `void` | `reset()` Resets the codec, preparing it for reuse.

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

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

- - ### Method Detail

    - #### getBuffer

          protected static byte[] getBuffer(int size)

    - #### compress

          public boolean compress(ByteBuffer in,
                                  ByteBuffer out,
                                  ByteBuffer overflow,
                                  CompressionCodec.Options options)

      Description copied from interface: `CompressionCodec`
      Compress the in buffer to the out buffer.
      Specified by:
        `compress` in interface `CompressionCodec`
      Parameters:
        `in` - the bytes to compress
        `out` - the compressed bytes
        `overflow` - put any additional bytes here
        `options` - the options to control compression
      Returns:
        true if the output is smaller than input

    - #### decompress

          public void decompress(ByteBuffer in,
                                 ByteBuffer out)
                          throws IOException

      Description copied from interface: `CompressionCodec`
      Decompress the in buffer to the out buffer.
      Specified by:
        `decompress` in interface `CompressionCodec`
      Parameters:
        `in` - the bytes to decompress
        `out` - the decompressed bytes
      Throws:
        `IOException`

    - #### getDefaultOptions

          public CompressionCodec.Options getDefaultOptions()

      Description copied from interface: `CompressionCodec`
      Get the default options for this codec.
      Specified by:
        `getDefaultOptions` in interface `CompressionCodec`
      Returns:
        the default options object

    - #### reset

          public void reset()

      Description copied from interface: `CompressionCodec`
      Resets the codec, preparing it for reuse.
      Specified by:
        `reset` in interface `CompressionCodec`

    - #### destroy

          public void destroy()

      Description copied from interface: `CompressionCodec`
      Closes the codec, releasing the resources.
      Specified by:
        `destroy` in interface `CompressionCodec`

    - #### getKind

          public CompressionKind getKind()

      Description copied from interface: `CompressionCodec`
      Get the compression kind.
      Specified by:
        `getKind` in interface `CompressionCodec`

    - #### close

          public void close()

      Description copied from interface: `CompressionCodec`
      Return the codec to the pool.
      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in interface `CompressionCodec`

Copyright © 2013–2020 The Apache Software Foundation. All rights reserved.