Skip to content

Library for serializing protobuf objects - Go version

License

Notifications You must be signed in to change notification settings

fabgeyer/pbzlib-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Library for serializing protobuf objects - Go version

This library is used for simplifying the serialization and deserialization of protocol buffer objects to/from files. The main use-case is to save and read a large collection of objects of the same type. Each file contains a header with the description of the protocol buffer, meaning that no compilation of .proto description file is required before reading a pbz file.

Example

Reading a pbz file:

package main

import (
	"fmt"
	"io"

	"github.com/fabgeyer/pbzlib-go"
)

func main() {
	rdr, _ := pbzlib.NewReader("output.pbz")
	defer rdr.Close()
	for {
		msg, err := rdr.Read()
		if err == io.EOF {
			break
		}
		fmt.Println(msg)
	}
}

Versions in other languages

About

Library for serializing protobuf objects - Go version

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published