-
- All Known Implementing Classes:
ZCompressor
public interface BufferCompressor
Implementors of the BufferCompressor interface may be used to compress or expand discrete buffers of data.- Since:
- 2.4.4
- See Also:
CompressionFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
compressBuffer(byte[] output, int outoff, byte[] input, int inoff, int inlen)
Compress a discrete buffer.int
expandBuffer(byte[] output, int outoff, byte[] input, int inoff, int inlen)
Expand a discrete buffer.
-
-
-
Method Detail
-
compressBuffer
int compressBuffer(byte[] output, int outoff, byte[] input, int inoff, int inlen) throws java.lang.RuntimeException
Compress a discrete buffer.- Parameters:
output
- output buffer that will hold the compressed dataoutoff
- offset into the output buffer to write the compressed datainput
- input buffer containing the data to be compressedinoff
- offset into the input bufferinlen
- the size of the data to be compressed- Returns:
- If the entire input buffer was compressed, this method returns the number of bytes used in the compressed output buffer, including the last partial byte (if any). If the entire input buffer could not be compressed into the given output buffer, this method returns a negative integer. This is an error, indicating that the request must be retried completely with a larger output buffer.
- Throws:
java.lang.RuntimeException
- depending on the implementation
-
expandBuffer
int expandBuffer(byte[] output, int outoff, byte[] input, int inoff, int inlen) throws java.lang.RuntimeException
Expand a discrete buffer.- Parameters:
output
- output buffer that will hold the expanded dataoutoff
- offset into the output buffer to write the expanded datainput
- input buffer containing the data to be expandedinoff
- offset into the input bufferinlen
- the size of the data to be expanded- Returns:
- If the entire input buffer was expanded, this method returns the number of bytes used in the expanded output buffer. If the entire input buffer could not be expanded into the given output buffer, this method returns a negative integer. This is an error, indicating that the request must be retried completely with a larger output buffer.
- Throws:
java.lang.RuntimeException
- depending on the implementation
-
-