Module ibm.jzos
Package com.ibm.jzos

Interface BufferCompressor

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:
  • Method Summary

    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 Details

    • compressBuffer

      int compressBuffer(byte[] output, int outoff, byte[] input, int inoff, int inlen) throws RuntimeException
      Compress a discrete buffer.
      Parameters:
      output - output buffer that will hold the compressed data
      outoff - offset into the output buffer to write the compressed data
      input - input buffer containing the data to be compressed
      inoff - offset into the input buffer
      inlen - 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:
      RuntimeException - depending on the implementation
    • expandBuffer

      int expandBuffer(byte[] output, int outoff, byte[] input, int inoff, int inlen) throws RuntimeException
      Expand a discrete buffer.
      Parameters:
      output - output buffer that will hold the expanded data
      outoff - offset into the output buffer to write the expanded data
      input - input buffer containing the data to be expanded
      inoff - offset into the input buffer
      inlen - 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:
      RuntimeException - depending on the implementation