Interface SequenceProducer


public interface SequenceProducer
Interface for an extenal sequence producer. To register a sequence producer, pass an object implementing this interface to ZstdCompressCtx.registerSequenceProducer(SequenceProducer).
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Allocate the sequence producer state.
    void
    freeState(long statePointer)
    Free the sequence producer state.
    long
    Returns a pointer to the sequence producer function.
  • Method Details

    • getFunctionPointer

      long getFunctionPointer()
      Returns a pointer to the sequence producer function. This method is called once in ZstdCompressCtx.registerSequenceProducer(SequenceProducer).
      Returns:
      A function pointer of type ZSTD_sequenceProducer_F *
    • createState

      long createState()
      Allocate the sequence producer state. The returned pointer will be passed to the sequence producer function. This method is called once in ZstdCompressCtx.registerSequenceProducer(SequenceProducer).
      Returns:
      A void * pointer to the sequence producer state
    • freeState

      void freeState(long statePointer)
      Free the sequence producer state. This method is called when closing the ZstdCompressCtx or registering a different sequence producer.
      Parameters:
      statePointer - the state pointer to be freed