Class Snappy

java.lang.Object
io.netty.handler.codec.compression.Snappy

public final class Snappy extends Object
Uncompresses an input ByteBuf encoded with Snappy compression into an output ByteBuf.

See snappy format.

  • Constructor Details

    • Snappy

      public Snappy()
  • Method Details

    • withHashTableReuse

      public static Snappy withHashTableReuse()
    • reset

      public void reset()
    • encode

      public void encode(ByteBuf in, ByteBuf out, int length)
    • getHashTableFastThreadLocalArrayFill

      public static short[] getHashTableFastThreadLocalArrayFill(int hashTableSize)
      Returns a short[] from a FastThreadLocal, zeroing for correctness creating a new one and resizing it if necessary
      Parameters:
      hashTableSize -
      Returns:
      An appropriately sized empty hashtable
    • decode

      public void decode(ByteBuf in, ByteBuf out)