# Stream, compress or keep simulation results in files

Choose explicit CSV/DAT destinations for streamed text, use gzip for supported text output, and distinguish file output from retaining interactive GUI arrays.

## Compatibility

2.9.0 release target; frozen Windows candidate CLI and maintained-source evidence

Published guidance with release-applicability limits. Confirm package applicability before following this guide.

[Download Stream, compress or keep simulation results in files (ZIP)](/_functions/kbExample?name=output-modes.zip)

Includes: output_rc.cir, measured_output.cir, README.txt.

## Choose the result-storage mode

1. Open a saved source netlist and Run settings. Keep Serial execution for streamed output.
2. Choose Keep interactive plots when you need retained waveform arrays, Files only — buffered for native files without retained arrays, or Files only — streamed text for queued CSV/DAT output.
3. For a file-only route, provide an explicit native output destination and .PRINT selectors for every case. Streamed text supports CSV/DAT, optionally gzip, and excludes transient measurements. Save and preview the actual plan before running.
4. After success, open a committed numerical file to plot file-only results. A planned destination or an old file does not prove that the new run completed.

![Native JoSIM Run settings with Serial execution and Files only — streamed text selected, plus the memory and queue controls.](https://static.wixstatic.com/media/31de30_6af194a9ebbd4442ac2fc2126a62908c~mv2.png)

Files only — streamed text is selected with Serial execution. The guide’s data checks exercise the CLI, not GUI retention or memory limits.

## Save output_rc.cir

```text
* RC output example: 50 ohm, 0.2 pF, 10 ps time constant
V1 IN 0 PWL(0 0 10p 0 20p 1m 100p 1m)
R1 IN OUT 50
C1 OUT 0 0.2p
.OPTION ANALYSIS=VOLTAGE INTEGRATION=BDF SEED=321
.TRAN 0.5p 100p 0 0.5p
.PRINT V(IN) V(OUT) I(R1)
.END

```

## Run buffered, streamed and compressed variants

The compressed.csv request writes compressed.csv.gz. A .gz suffix is a compression suffix; the preceding .csv or .dat selects the logical text format. Read the actual reported path.

Use buffered output when a downstream reader requires BIN or RAW. Streamed RAW falls back to CSV with a warning in the checked candidate. Compression is not applied to BIN, RAW or STDOUT.

```text
josim-pro-cli -P 17 -o buffered.csv output_rc.cir
josim-pro-cli --stream -P 17 -o streamed.csv output_rc.cir
josim-pro-cli --compressed -P 17 -o compressed.csv output_rc.cir
josim-pro-cli --stream --compressed -P 17 -o streamed-compressed.csv.gz output_rc.cir
```

## Check numerical data inside gzip

The checked RC outputs contain time in seconds, V(IN)/V(OUT) in volts and I(R1) in amperes: 201 finite rows over 0–100 ps. Parsed streamed and decompressed samples exactly matched the buffered output in this example. This does not measure peak memory or prove physical accuracy.

```text
import csv, gzip, math
with gzip.open("compressed.csv.gz", "rt", encoding="utf-8-sig", newline="") as f:
    rows = list(csv.reader(f))
values = [[float(v) for v in row] for row in rows[1:] if row]
assert len(values) == 201
assert all(len(row) == 4 and all(math.isfinite(v) for v in row) for row in values)
print(rows[0], values[0][0], values[-1][0])
```

## Save the measurement variant as measured_output.cir

```text
* RC output example: 50 ohm, 0.2 pF, 10 ps time constant
V1 IN 0 PWL(0 0 10p 0 20p 1m 100p 1m)
R1 IN OUT 50
C1 OUT 0 0.2p
.OPTION ANALYSIS=VOLTAGE INTEGRATION=BDF SEED=321
.TRAN 0.5p 100p 0 0.5p
.PRINT V(IN) V(OUT) I(R1)
.MEASURE TRAN peak MAX V(OUT)
.END

```

## Recover when a measurement needs buffered output

A .MEASURE TRAN request with --stream was rejected with “buffered output is required” before replacing a pre-existing result. Remove --stream, or choose a buffered GUI mode, and rerun to a new filename. The checked buffered recovery completed with finite traces and a peak measurement.

File-only mode reduces retained waveform memory; the matrix, solver state and buffered output still use memory. Writer queue capacity is not a cap on total process memory.

```text
josim-pro-cli -P 17 -o measured.csv measured_output.cir
```

## Sources and verification details

Recorded inputs/builds only. Complete walkthrough and final-package acceptance remain separate.

- VAL-017: JoSIM-Pro 2.9 frozen Windows source candidate built 3 November 2026; not the final distributed package. Fixed-seed noise/spread repetition and CLI precedence; buffered/streamed/gzip data; six Cartesian sweep cases; saved testbench verdicts, provenance hashes, generation protection and recovery Twenty-two checks cover these CLI inputs and runtime only. Native screenshots illustrate authoring/settings controls without a GUI calculation, preview or saved-bench run. Cross-platform repeatability, peak memory, cancellation, other analysis families and final-package acceptance remain unverified. The constant-circuit numerical bounds are example-specific, not universal solver tolerances.

- josim-streamed-files-settings: JoSIM-Pro 2.9 frozen Windows candidate, native controls, 3 November 2026. A native control illustration. The separately recorded CLI examples do not qualify this GUI route or the final distributed package.

- josim-pro:docs/manual_source/sections/usage.tex: Output targets and file formats; Streaming output; Compression
- josim-pro:docs/manual_source/sections/gui_simulation_results.tex: Run settings: Execution and memory; Result storage
- validation:josim-jobs-windows-20261103: VAL-017; exact complete inputs, checked CLI outcomes and limits
- capture:josim-jobs-ui-20261103T145751: Production control illustrations only; no GUI solve, preview or bench run
- owner:technical-review-20261102: 2.9 public target; final distributed-package checks required

- VAL-017 checks the supplied CLI recipe on the frozen Windows candidate. The source manuals still match their reviewed hashes.
- Native images illustrate actual controls; the settings/workbench were cancelled and the testbench view hidden. Complete GUI, technical and final-package acceptance remain pending.

## Related guides

- [Export waveform figures or numerical CSV/TSV data](/knowledge-base/josim-export-results)
- [Measure transient delays, peaks and scalar results](/knowledge-base/josim-measurements)
- [Run JoSIM®-Pro from the command line and save numerical output](/knowledge-base/josim-cli-output)
