An RDF.rb extension for encoding and decoding RDF knowledge graphs in the Borsh binary serialization format.
- Ruby 3.0+
gem install rdf-borsh
require 'rdf/borsh'
include RDF
RDF::Borsh::Writer.open("mygraph.rdfb") do |writer|
writer << [RDF::URI("https://rubygems.org/gems/rdf-borsh"), RDFS.label, "RDF/Borsh for Ruby"]
end
graph = RDF::Graph.load("mygraph.rdfb")
graph.to_a
RDF::Borsh::Reader.new($stdin).to_a
git clone https://github.com/ruby-rdf/rdf-borsh.git