Streams: Difference between revisions
(Created page with "= Streams = The '''Streams''' module provides stream processing and compression functionality for the SCM programming language. This module includes: * '''Stream creation''': Functions to create streams from string content (streamString) * '''Compression''': Stream compression using gzip and xz algorithms * '''Decompression''': Stream decompression using zcat (gzip) and xzcat (xz) functions These functions enable efficient handling of data streams, file compression, a...") |
No edit summary |
||
| Line 11: | Line 11: | ||
← Back to [[Full SCM API documentation]] | ← Back to [[Full SCM API documentation]] | ||
<span id="streamstring"></span> | |||
== streamString == | == streamString == | ||
| Line 17: | Line 19: | ||
'''Allowed number of parameters:''' 1–1 | '''Allowed number of parameters:''' 1–1 | ||
<span id="parameters"></span> | |||
=== Parameters === | |||
* '''content''' (<code>string</code>): content to put into the stream | * '''content''' (<code>string</code>): content to put into the stream | ||
<span id="returns"></span> | |||
=== Returns === | |||
<code>stream</code> | |||
== gzip == | == gzip == | ||
| Line 28: | Line 35: | ||
'''Allowed number of parameters:''' 1–1 | '''Allowed number of parameters:''' 1–1 | ||
<span id="parameters-1"></span> | |||
=== Parameters === | |||
* '''stream''' (<code>stream</code>): input stream | * '''stream''' (<code>stream</code>): input stream | ||
<span id="returns-1"></span> | |||
=== Returns === | |||
<code>stream</code> | |||
== xz == | == xz == | ||
| Line 39: | Line 51: | ||
'''Allowed number of parameters:''' 1–1 | '''Allowed number of parameters:''' 1–1 | ||
<span id="parameters-2"></span> | |||
=== Parameters === | |||
* '''stream''' (<code>stream</code>): input stream | * '''stream''' (<code>stream</code>): input stream | ||
<span id="returns-2"></span> | |||
=== Returns === | |||
<code>stream</code> | |||
== zcat == | == zcat == | ||
| Line 50: | Line 67: | ||
'''Allowed number of parameters:''' 1–1 | '''Allowed number of parameters:''' 1–1 | ||
<span id="parameters-3"></span> | |||
=== Parameters === | |||
* '''stream''' (<code>stream</code>): input stream | * '''stream''' (<code>stream</code>): input stream | ||
<span id="returns-3"></span> | |||
=== Returns === | |||
<code>stream</code> | |||
== xzcat == | == xzcat == | ||
| Line 61: | Line 83: | ||
'''Allowed number of parameters:''' 1–1 | '''Allowed number of parameters:''' 1–1 | ||
<span id="parameters-4"></span> | |||
=== Parameters === | |||
* '''stream''' (<code>stream</code>): input stream | * '''stream''' (<code>stream</code>): input stream | ||
<span id="returns-4"></span> | |||
=== Returns === | |||
<code>stream</code> | |||
Revision as of 08:23, 27 August 2026
Streams
The Streams module provides stream processing and compression functionality for the SCM programming language. This module includes:
- Stream creation: Functions to create streams from string content (streamString)
- Compression: Stream compression using gzip and xz algorithms
- Decompression: Stream decompression using zcat (gzip) and xzcat (xz) functions
These functions enable efficient handling of data streams, file compression, and decompression operations in SCM programs, particularly useful for processing large datasets and file I/O operations.
← Back to Full SCM API documentation
streamString
creates a stream that contains a string
Allowed number of parameters: 1–1
Parameters
- content (
string): content to put into the stream
Returns
stream
gzip
compresses a stream with gzip. Create streams with (stream filename)
Allowed number of parameters: 1–1
Parameters
- stream (
stream): input stream
Returns
stream
xz
compresses a stream with xz. Create streams with (stream filename)
Allowed number of parameters: 1–1
Parameters
- stream (
stream): input stream
Returns
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
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
stream