Class CompressionHandlerProvider

java.lang.Object
com.viaversion.viarewind.protocol.v1_8to1_7_6_10.provider.CompressionHandlerProvider
All Implemented Interfaces:
com.viaversion.viaversion.api.platform.providers.Provider
Direct Known Subclasses:
TrackingCompressionHandlerProvider

public abstract class CompressionHandlerProvider extends Object implements com.viaversion.viaversion.api.platform.providers.Provider
  • Constructor Details

    • CompressionHandlerProvider

      public CompressionHandlerProvider()
  • Method Details

    • setCompressionThreshold

      public abstract void setCompressionThreshold(com.viaversion.viaversion.api.connection.UserConnection user, int threshold)
    • onTransformPacket

      public abstract void onTransformPacket(com.viaversion.viaversion.api.connection.UserConnection user)
    • getEncoder

      public abstract io.netty.channel.ChannelHandler getEncoder(Object compressor, int threshold)
      Creates the compression encoder
      Parameters:
      compressor - A nullable object that may present a native backend for compression (if available)
      threshold - The compression threshold
      Returns:
      The encoder
    • getDecoder

      public abstract io.netty.channel.ChannelHandler getDecoder(Object compressor, int threshold)
      Creates the compression decoder
      Parameters:
      compressor - A nullable object that may present a native backend for compression (if available)
      threshold - The compression threshold
      Returns:
      The decoder
    • isRemoveCompression

      public boolean isRemoveCompression(com.viaversion.viaversion.api.connection.UserConnection user)
    • setRemoveCompression

      public void setRemoveCompression(com.viaversion.viaversion.api.connection.UserConnection user, boolean enabled)