public class GZipCompressor extends Object implements IRecordCompressor
Constructor and Description |
---|
GZipCompressor() |
Modifier and Type | Method and Description |
---|---|
void |
compress(byte[] bytes,
int off,
int len,
OutputStream os)
Compresses data onto the output stream.
|
void |
compress(byte[] bytes,
OutputStream os)
Compresses data onto the output stream.
|
ByteBuffer |
compress(ByteBuffer bin)
Compresses data onto the provided ByteBuffer.
|
void |
compress(ByteBuffer bin,
ByteBuffer out)
Compresses data onto the provided ByteBuffer.
|
void |
compress(ByteBuffer bin,
OutputStream os)
Compresses data onto the output stream.
|
ByteBuffer |
decompress(byte[] bin)
Decompress a
byte[] containing the record and return the
uncompressed state. |
ByteBuffer |
decompress(ByteBuffer bin)
Decompress a
ByteBuffer containing the record and return the
uncompressed state. |
ByteBuffer |
decompress(InputStream instr) |
public void compress(ByteBuffer bin, ByteBuffer out)
IRecordCompressor
compress
in interface IRecordCompressor
bin
- The data. The data from the position to the limit will be
compressed. The position will be advanced to the limit as a
side effect.out
- The ByteBuffer into which the compressed data is writtenpublic ByteBuffer compress(ByteBuffer bin)
IRecordCompressor
compress
in interface IRecordCompressor
bin
- The data. The data from the position to the limit will be
compressed. The position will be advanced to the limit as a
side effect.public void compress(ByteBuffer bin, OutputStream os)
IRecordCompressor
compress
in interface IRecordCompressor
bin
- The data. The data from the position to the limit will be
compressed. The position will be advanced to the limit as a
side effect.os
- The stream onto which the compressed data are written.public void compress(byte[] bytes, OutputStream os)
IRecordCompressor
compress
in interface IRecordCompressor
bytes
- The data.os
- The stream onto which the compressed data are written.public void compress(byte[] bytes, int off, int len, OutputStream os)
IRecordCompressor
compress
in interface IRecordCompressor
bytes
- The source data.off
- The offset of the first source byte that will be compressed
onto the output stream.len
- The #of source bytes that will be compressed onto the output
stream.os
- The stream onto which the compressed data are written.public ByteBuffer decompress(ByteBuffer bin)
IRecordCompressor
ByteBuffer
containing the record and return the
uncompressed state.decompress
in interface IRecordCompressor
bin
- The compressed data.public ByteBuffer decompress(byte[] bin)
IRecordCompressor
byte[]
containing the record and return the
uncompressed state.decompress
in interface IRecordCompressor
bin
- The compressed data.public ByteBuffer decompress(InputStream instr)
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.