encoding

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 1, 2021 License: Zlib Imports: 10 Imported by: 0

README

xirho/encoding

Package encoding implements marshaling and unmarshaling xirho systems.

The encoding format is JSON. See xirho/img for examples.

Documentation

Overview

Package encoding implements marshaling and unmarshaling function systems.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(system xirho.System, r *xirho.Render) ([]byte, error)

Marshal creates a JSON encoding of the renderer and system information needed to serialize the system. If system.Check returns a non-nil error, then that error is returned instead.

func Unmarshal

func Unmarshal(d *json.Decoder) (system xirho.System, render *xirho.Render, aspect float64, err error)

Unmarshal decodes a xirho renderer from serialized JSON. The returned aspect is the number of columns per row in the histogram. The histogram should have its Reset method called before use. The Procs, N, and Q fields are left 0. Calling UseNumber on the decoder allows Unmarshal to guarantee full precision for xirho.Int function parameters.

Types

This section is empty.

Directories

Path Synopsis
Package flame implements parsing the XML-based Flame format.
Package flame implements parsing the XML-based Flame format.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL