public interface Compression extends CompressionInformation
Modifier and Type | Interface and Description |
---|---|
static class |
Compression.Type
Enum identifying if this object will be used to compress
or uncompress data.
|
NamedResource.Utils
BY_NAME_COMPARATOR, NAME_EXTRACTOR
Modifier and Type | Method and Description |
---|---|
void |
compress(Buffer buffer)
Compress the given buffer in place.
|
void |
init(Compression.Type type,
int level)
Initialize this object to either compress or uncompress data.
|
void |
uncompress(Buffer from,
Buffer to)
Uncompress the data in a buffer into another buffer.
|
isCompressionExecuted, isDelayed
getName
void init(Compression.Type type, int level)
compress
or uncompress
.
Once the object has been initialized, only one of
compress
or uncompress
methods can be
called.type
- compression typelevel
- compression levelvoid compress(Buffer buffer) throws IOException
buffer
- the buffer containing the data to compressIOException
- if an error occursvoid uncompress(Buffer from, Buffer to) throws IOException
from
- the buffer containing the data to uncompressto
- the buffer receiving the uncompressed dataIOException
- if an error occursCopyright © 2008–2016 The Apache Software Foundation. All rights reserved.