public class Encoder extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Encoder.Mode
...
See encode.h, typedef enum BrotliEncoderMode
|
static class |
Encoder.Parameters
Brotli encoder settings.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attachDictionary(PreparedDictionary dictionary) |
static byte[] |
compress(byte[] data) |
static byte[] |
compress(byte[] data,
Encoder.Parameters params) |
static byte[] |
compress(byte[] data,
int offset,
int length) |
static byte[] |
compress(byte[] data,
int offset,
int length,
Encoder.Parameters params) |
boolean |
encode(com.aayushatharva.brotli4j.encoder.EncoderJNI.Operation op) |
void |
flush() |
static PreparedDictionary |
prepareDictionary(ByteBuffer dictionary,
int sharedDictionaryType)
Prepares raw or serialized dictionary for being used by encoder.
|
public static byte[] compress(byte[] data,
int offset,
int length,
Encoder.Parameters params)
throws IOException
IOExceptionpublic static byte[] compress(byte[] data)
throws IOException
IOExceptionpublic static byte[] compress(byte[] data,
Encoder.Parameters params)
throws IOException
IOExceptionpublic static byte[] compress(byte[] data,
int offset,
int length)
throws IOException
IOExceptionpublic static PreparedDictionary prepareDictionary(ByteBuffer dictionary, int sharedDictionaryType)
dictionary - raw / serialized dictionary data; MUST be directsharedDictionaryType - dictionary data typePreparedDictionary instancepublic void attachDictionary(PreparedDictionary dictionary) throws IOException
IOExceptionpublic boolean encode(com.aayushatharva.brotli4j.encoder.EncoderJNI.Operation op)
throws IOException
IOExceptionpublic void flush()
throws IOException
IOExceptionCopyright © 2024. All rights reserved.