Streams: Difference between revisions

From MemCP
Jump to navigation Jump to search
(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 difference)

Latest revision as of 18:43, 25 August 2025

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