Sia provides a low-level API for serializing and deserializing data. This API is ideal for developers who require fine-grained control over the serialization process.
Sia is a flat binary serialization format that stores data in a compact and efficient way. Sia strips away all unnecessary metadata and focuses on the essentials. The Sia format is designed to be fast, small, and easy to use.
The low-level API defines a set of methods for adding and reading data. Libraries for each language follow the naming conventions of the language. For example, in JavaScript, the method to add a is , while in Go, the method is , and in Python, the method is .
At the end of each function name, the number represents the number of bytes used to store the data, or the number of bytes required to store the length of an or . For example, stores an value in one byte, while stores an with a length that fits in eight bytes (up to).
Install the Sia package from npm:
Then, use the following code to serialize and deserialize a JavaScript object:
You can serialize and deserialize arrays of objects using the Sia low-level API like this:
Install the Sia package from GitHub:
Then, use the following code to serialize a Go struct:
You can serialize and deserialize arrays of objects using the Sia low-level API like this:
Install the Sia package from PyPI:
Then, use the following code to serialize and deserialize a Python object:
You can serialize and deserialize arrays of objects using the Sia low-level API like this:
Pl. de l'Industrie 2, 1180 Rolle, Switzerland