Class BrotliCommon

java.lang.Object
org.brotli.wrapper.common.BrotliCommon

public class BrotliCommon extends Object
JNI wrapper for brotli common.
  • Field Details

  • Constructor Details

    • BrotliCommon

      public BrotliCommon()
  • Method Details

    • checkDictionaryDataMd5

      public static boolean checkDictionaryDataMd5(byte[] digest)
      Checks if the given checksum matches MD5 checksum of the RFC dictionary.
    • checkDictionaryDataSha1

      public static boolean checkDictionaryDataSha1(byte[] digest)
      Checks if the given checksum matches SHA-1 checksum of the RFC dictionary.
    • checkDictionaryDataSha256

      public static boolean checkDictionaryDataSha256(byte[] digest)
      Checks if the given checksum matches SHA-256 checksum of the RFC dictionary.
    • makeNative

      public static ByteBuffer makeNative(byte[] data)
      Copy bytes to a new direct ByteBuffer. Direct byte buffers are used to supply native code with large data chunks.
    • setDictionaryData

      public static void setDictionaryData(byte[] data)
      Copies data and sets it to be brotli dictionary.
    • setDictionaryData

      public static void setDictionaryData(InputStream src) throws IOException
      Reads data and sets it to be brotli dictionary.
      Throws:
      IOException
    • setDictionaryData

      public static void setDictionaryData(ByteBuffer data)
      Sets data to be brotli dictionary.