Streams

From MemCP
Revision as of 11:59, 28 August 2026 by Wikiservice (talk | contribs) (Refresh MemCP documentation: accuracy, operational guidance, performance profile and maintained API reference)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Streams

Generated from MemCP commit c42e19eba on 27 August 2026. See Full SCM API documentation.

The Streams module processes data incrementally instead of requiring one complete in-memory string. It includes string-backed streams plus gzip/xz compression and decompression adapters.

Compression functions produce compressed output; zcat and xzcat decode compressed input. Choose the direction explicitly when composing import and export pipelines, and close externally owned resources according to the caller's IO contract.

streamString

creates a stream that contains a string

Allowed number of parameters: 1–1

Parameters

  • content (string): content to put into the stream

Returns

  • value (stream)

gzip

compresses a stream with gzip. Create streams with (stream filename)

Allowed number of parameters: 1–1

Parameters

  • stream (stream): input stream

Returns

  • value (stream)

xz

compresses a stream with xz. Create streams with (stream filename)

Allowed number of parameters: 1–1

Parameters

  • stream (stream): input stream

Returns

  • value (stream)

zcat

turns a compressed gzip stream into a stream of uncompressed data. Create streams with (stream filename)

Allowed number of parameters: 1–1

Parameters

  • stream (stream): input stream

Returns

  • value (stream)

xzcat

turns a compressed xz stream into a stream of uncompressed data. Create streams with (stream filename)

Allowed number of parameters: 1–1

Parameters

  • stream (stream): input stream

Returns

  • value (stream)