encodeBinary method

Uint8List encodeBinary(
  1. RdfGraph graph, {
  2. String? contentType,
  3. RdfBinaryEncoderOptions? options,
})

Encode an RDF graph to binary.

Converts an in-memory RDF graph into a binary representation in the specified format. If no format is specified, the default binary codec is used.

Throws CodecNotSupportedException if no binary codec matches.

Implementation

Uint8List encodeBinary(
  RdfGraph graph, {
  String? contentType,
  RdfBinaryEncoderOptions? options,
}) =>
    binaryGraphCodec(contentType: contentType, encoderOptions: options)
        .encode(graph);