Streams: Difference between revisions
No edit summary |
Wikiservice (talk | contribs) (Refresh MemCP documentation: accuracy, operational guidance, performance profile and maintained API reference) |
||
| Line 1: | Line 1: | ||
<!-- Copyright (C) 2026 Carl-Philip Haensch --> | |||
<!-- SPDX-License-Identifier: GPL-3.0-or-later --> | |||
<span id="streams"></span> | |||
= Streams = | = Streams = | ||
<!-- Generated from MemCP c42e19eba on 2026-08-27; do not edit manually. --> | |||
<div class="mw-message-box mw-message-box-notice">Generated from MemCP commit <code>c42e19eba</code> on 27 August 2026. See [[Full SCM API documentation]].</div> | |||
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; <code>zcat</code> and <code>xzcat</code> 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. | |||
<span id="streamstring"></span> | <span id="streamstring"></span> | ||
| Line 27: | Line 27: | ||
=== Returns === | === Returns === | ||
<code>stream</code> | * '''value''' (<code>stream</code>) | ||
== gzip == | == gzip == | ||
| Line 43: | Line 43: | ||
=== Returns === | === Returns === | ||
<code>stream</code> | * '''value''' (<code>stream</code>) | ||
== xz == | == xz == | ||
| Line 59: | Line 59: | ||
=== Returns === | === Returns === | ||
<code>stream</code> | * '''value''' (<code>stream</code>) | ||
== zcat == | == zcat == | ||
| Line 75: | Line 75: | ||
=== Returns === | === Returns === | ||
<code>stream</code> | * '''value''' (<code>stream</code>) | ||
== xzcat == | == xzcat == | ||
| Line 91: | Line 91: | ||
=== Returns === | === Returns === | ||
<code>stream</code> | * '''value''' (<code>stream</code>) | ||
Latest revision as of 11:59, 28 August 2026
Streams
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)