Skip to content

Commit

Permalink
Update links
Browse files Browse the repository at this point in the history
  • Loading branch information
pouya-eghbali committed Jan 17, 2025
1 parent e4c9392 commit 4f4a1c9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
# Sia

[![Build Status](https://github.com/logicalangel/go-sia/actions/workflows/test.yml/badge.svg?branch=master)][actions]
[![Build Status](https://github.com/TimeleapLabs/go-sia/actions/workflows/test.yml/badge.svg?branch=master)][actions]

Sia - Binary serialisation and deserialisation with built-in compression. You can consider Sia a strongly typed, statically typed domain specific binary language for constructing data. Sia preserves data types and supports custom ones.

[actions]: https://github.com/logicalangel/go-sia
[actions]: https://github.com/TimeleapLabs/go-sia

## Install

`
go get github.com/pouya-eghbali/go-sia
`
`go get github.com/TimeleapLabs/go-sia/v2`

## Basic Usage

To serialize multiple values, first create a sia object and then you can add values in order. Note that the order of adding values should be considered when you want to read them again.

Serializing:

```go
rawByte := sia.New().
AddUInt16(1234).
Expand All @@ -25,10 +24,11 @@ rawByte := sia.New().
```

Deserializing:

```go
deserialized := sia.NewFromBytes(rawByte)
gotSampleUint16 := deserialized.ReadUInt16() // 1234
gotSampleString := deserialized.ReadString64() // think simple, do simple!
```

Note that sia can't handle serializing of arrays, so it will fall back to JSON marshal about them.
Note that sia can't handle serializing of arrays, so it will fall back to JSON marshal about them.

0 comments on commit 4f4a1c9

Please sign in to comment.