Back to Fprime

Svc::DpZLibCompressor

Svc/DpZLibCompressor/docs/sdd.md

4.3.02.8 KB
Original Source

Svc::DpZLibCompressor

Svc::DpZLibCompressor is a Data Product Compressor using ZLib and the DEFLATE algorithm to compress data product chunks. Svc::DpZLibCompressor is responsible for receiving chunks of data to compress from DpCompressProc and attempting to compress them.

Usage Examples

See DpCompressProc

Port Descriptions

NameDescription
compressChunkReceive chunks of data to compress. See DpCompressProc for more information
bufferCompressionGetGet an Fw::Buffer. This compression buffer is used as a temporary buffer to store the results of the compression
bufferCompressionReturnReturn the compression buffer
bufferZLibGetGet an Fw::Buffer. This zlib buffer is used as a memory pool to implement malloc/free for zlib through an internal bump allocator
bufferZLibReturnReturn the zlib buffer

Component States

None. DpZLibCompressor is stateless between invocations

Sequence Diagrams

See DpCompressProc

Parameters

NameDescription
CompressionLevelCompression level to pass to zlib in the range [0, 9] inclusive. 0 indicates no compression and 9 indicates maximum compression at the cost of runtime
ZLibBufferSizeSize of the ZLib allocator buffer to request through the bufferZLibGet port

Requirements

Add requirements in the chart below

NameDescriptionValidation
SVC-DPZLIBCOMPRESSOR-001Svc::DpZLibCompressor shall attempt to compress incoming data chunks per the protocol defined by DpCompressProcUnit Test
SVC-DPZLIBCOMPRESSOR-002Svc::DpZLibCompressor shall either return Svc::CompressionAlgorithm::UNCOMPRESSED or Svc::CompressionAlgorithm::ZLIB_DEFLATE from the compressChunk input portUnit Test

Events

NameDescription
ZLibCompressBadBufferWARNING_LO Unable to allocate a compression buffer through BufferManager
ZLibAllocBadBufferWARNING_LO Unable to allocate an alloc buffer through BufferManager
ZLibInitErrorWARNING_LO ZLib error during deflateInit call
ZLibDeflateErrorWARNING_LO ZLib error during deflate call
BufferTooBigForZLibWARNING_LO Buffer size exceeds zlib integer size limits
ZLibNoCompressionDIAGNOSTIC ZLib unable to compress buffer
ZLibCompressionDIAGNOSTIC ZLib compressed buffer
ZLibMemoryUsageDIAGNOSTIC ZLib maximum memory usage during compression

Change Log

DateDescription
04/14/2026Initial Draft