Skip to content

d-o-n-u-t-s/lz4msgpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Suitabled MessagePack-CSharp serializer for Golang

This serializer created for MessagePack-CSharp + LZ4 encoded data. It is mutually compatible.

Installation

go get -u github.com/d-o-n-u-t-s/lz4msgpack

How to use

func Sample() {
	type Message struct {
		Hello string
	}

	b, err := lz4msgpack.Marshal(&Message{Hello: "World"})
	if err != nil {
		panic(err)
	}

	var message Message
	err = lz4msgpack.Unmarshal(b, &message)
	if err != nil {
		panic(err)
	}
	fmt.Println(message.Hello)
}