compress/gzip: Fix example code

I tried to compile this example and received the following error:

```
Error: Cannot assign value 'os.stdin.stream' of type 'File_Stream' to 'Stream' in a structure literal
        input = os.stdin.stream,
                ^~~~~~~~~~~~~~^
```

The example was fixed by passing the File_Stream to `os.to_stream`.

Signed-off-by: Robert Stefanic <rstefanic72@gmail.com>
This commit is contained in:
Robert Stefanic
2026-07-31 21:44:52 -04:00
parent 6996445834
commit 2bcf11e677

View File

@@ -53,7 +53,7 @@ Example:
if file == "-" {
// Read from stdin
ctx := &compress.Context_Stream_Input{
input = os.stdin.stream,
input = os.to_stream(os.stdin),
}
err = gzip.load(ctx, &buf)
} else {