Closed flyon closed 3 months ago
HI @flyon!
the examples I'm finding the
StreamWriter
is always combined with aStreamReader
So instead of the N3.StreamReader
, you'll have a stream of quads of your own. Just plug that stream into the writer and it works.
I.e., it's the same as https://github.com/rdfjs/N3.js?tab=readme-ov-file#from-a-quad-stream-to-an-rdf-stream, except inputStream = createMyOwnStreamOfQuads()
, and then inputStream.pipe(streamWriter)
.
ah right like that. Perfect. Thank you @RubenVerborgh
In the documentation and the examples I'm finding the
StreamWriter
is always combined with aStreamReader
.But what if I already have my quads and I want to write them to a file with a stream? I have the following working code, but I want to switch it streams (and I'm happy to switch to another format then N3 since that's not supported for streaming).