Package com.github.luben.zstd
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 TypeMethodDescriptionlongAllocate the sequence producer state.voidfreeState(long statePointer) Free the sequence producer state.longReturns 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 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
-