Class Encoder

java.lang.Object
org.brotli.wrapper.enc.Encoder
Direct Known Subclasses:
BrotliEncoderChannel

public class Encoder extends Object
Base class for OutputStream / Channel implementations.
  • Method Details

    • attachDictionary

      public void attachDictionary(PreparedDictionary dictionary) throws IOException
      Throws:
      IOException
    • compress

      public static byte[] compress(byte[] data, Encoder.Parameters params) throws IOException
      Encodes the given data buffer.
      Throws:
      IOException
    • compress

      public static byte[] compress(byte[] data) throws IOException
      Throws:
      IOException
    • prepareDictionary

      public static PreparedDictionary prepareDictionary(ByteBuffer dictionary, int sharedDictionaryType)
      Prepares raw or serialized dictionary for being used by encoder.
      Parameters:
      dictionary - raw / serialized dictionary data; MUST be direct
      sharedDictionaryType - dictionary data type