Package com.github.luben.zstd
Interface SequenceProducer
-
public interface SequenceProducerInterface for an extenal sequence producer. To register a sequence producer, pass an object implementing this interface toZstdCompressCtx.registerSequenceProducer(SequenceProducer).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longcreateState()Allocate the sequence producer state.voidfreeState(long statePointer)Free the sequence producer state.longgetFunctionPointer()Returns a pointer to the sequence producer function.
-
-
-
Method Detail
-
getFunctionPointer
long getFunctionPointer()
Returns a pointer to the sequence producer function. This method is called once inZstdCompressCtx.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 inZstdCompressCtx.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 theZstdCompressCtxor registering a different sequence producer.- Parameters:
statePointer- the state pointer to be freed
-
-