Sha256: b12b1af6a6fb0ce28a2e05655017c5166c42f6c3815ad784274d125783a47b9b

Contents?: true

Size: 503 Bytes

Versions: 1

Compression:

Stored size: 503 Bytes

Contents

# This is free and unencumbered software released into the public domain.

require 'rdf/format'

module RDF::Borsh
  class Format < RDF::Format
    content_type 'application/x-rdf+borsh', extension: :borsh
    reader { RDF::Borsh::Reader }
    writer { RDF::Borsh::Writer }

    MAGIC = 'RDFB'.freeze
    VERSION = '1'.ord
    FLAGS = 0b00000111

    def self.name; "RDF/Borsh"; end

    def self.detect(sample)
      sample[0..4] == [MAGIC, VERSION].pack('a4C')
    end
  end # Format
end # RDF::Borsh

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rdf-borsh-1.0.0 lib/rdf/borsh/format.rb