⌂ Modules nupp nupp.compression nupp.compression.spi nupp.compression.spi
Implementation interfaces for compression stream catalogs.
Providers expose retained format descriptors. A descriptor creates independent encoder and decoder state, and every state operation is span based. Input steps return input consumed, output written and one of the integer status constants below. Flush and finalization steps return output written and a status. A failed step returns nil numeric fields and a reason. Providers retain neither span and perform no SPI lookup from a state operation.
The facade chooses the unique highest-priority catalog during initialization. Each format name agrees with its catalog key. Selected formats replace native formats with the same names and may add others. Discovery order never selects a provider.
Module contents Types Type Kind Description Decoderinterface Independent incremental decompression state. Encoderinterface Independent incremental compression state. Formatinterface Immutable format identity and state factories. FormatOptionstype The selected format's structural option block. Providerinterface A selectable implementation catalog.
Values Value Kind Description FINISHEDvariable The complete stream and its wrapper trailer have been processed. NEED_INPUTvariable The step needs another input chunk. NEED_OUTPUTvariable The step filled its output and must be called with more space.
Types
Decoderinterface
Independent incremental decompression state.
Members Name Kind Description closemethod Releases decoder state. readmethod Consumes input and produces output. finishInputmethod Reports source EOF.
closemethod
Releases decoder state.
Arguments Name Type Description takes selfDecoder
Returns
readmethod
Consumes input and produces output. NEED_INPUT consumes the whole input; NEED_OUTPUT fills the output; FINISHED completes the stream.
Arguments
Returns Type Description integer ? integer ? integer ? string ?
Encoderinterface
Independent incremental compression state.
Members Name Kind Description closemethod Releases encoder state without producing a trailer. writemethod Consumes input and produces output. flushmethod Flushes pending output. finishmethod Produces the trailer.
closemethod
Releases encoder state without producing a trailer.
Arguments Name Type Description takes selfEncoder
Returns
writemethod
Consumes input and produces output. NEED_INPUT consumes the whole input; NEED_OUTPUT fills the whole output span.
Arguments
Returns Type Description integer ? integer ? integer ? string ?
flushmethod
flush : function ( exclusive self : Encoder , exclusive output : ByteWriteSpan ) : ( integer ? , integer ? , string ? )
Flushes pending output. NEED_INPUT completes the flush; NEED_OUTPUT fills the whole output span.
Arguments
Returns Type Description integer ? integer ? string ?
finishmethod
Produces the trailer. FINISHED completes the stream; NEED_OUTPUT fills the whole output span and requires another call.
Arguments
Returns Type Description integer ? integer ? string ?
Providerinterface
A selectable implementation catalog.
Members Name Kind Description priorityfield formatsfield Canonical names mapped to checked, independent-state factories.
Values
FINISHEDvariable
The complete stream and its wrapper trailer have been processed.
NEED_OUTPUTvariable
The step filled its output and must be called with more space.
← Previous nupp.compression Next → nupp.derive