Data formats
Getting RDF into a sparq Graph: the four text formats, compressed ingest, and HDT.
Try it: parse RDF in your tab
Prefixed, compact triple syntax — the most human-readable.
gzip the document above entirely in your tab (the browser's native CompressionStream), then decode it back with DecompressionStream and parse the decoded text — the same JS-side decode a .ttl.gz upload takes before reaching Store.load.
sparq parses the four standard RDF text formats (Turtle / N-Triples / N-Quads / TriG) and JSON-LD 1.1 in sparq-core, with the binary HDT archive format in the opt-in sparq-hdt crate; the picker above runs the same loaders the published wasm bundle ships.
What it does
- Turtle / N-Triples / N-Quads / TriG — All four text formats, with named-graph preservation for the quad formats.
- JSON-LD 1.1 — JSON for linked data — parsed via the opt-in jsonld feature (oxjsonld), which the site bundle enables.
- Compressed & streaming ingest — gzip / zstd / bzip2 dumps decode-and-load natively (fused decompress + parallel parse); gzip also decodes live in the browser.
- HDT archives — Load .hdt and content-sniffed .hdt.gz/.zst/.bz2 via the opt-in sparq-hdt crate.
- RDF writer matrix — Serialize back out to Turtle / TriG / N-Quads / JSON-LD (engine serialize-rdf feature; N-Triples always on).
Live in your tab for the four text formats and JSON-LD — the demo runs the same loaders that ship in @jeswr/sparq, and the gzip panel decodes with the browser's native DecompressionStream before parsing, with no codec library and no server.
Reproduce: cargo test -p sparq-core
Caveats & limitations
Only gzip decodes in the browser (via DecompressionStream); zstd and bzip2 ingest, HDT loading, the mmap / external-memory path, and the fully-parallel fast loaders are native-only — in the browser the in-memory streaming loader is used.