fatedier 0f1005ff61 using glide | 7 lat temu | |
---|---|---|
.. | ||
README.md | 7 lat temu | |
simple-decoder.go | 7 lat temu | |
simple-encoder.go | 7 lat temu | |
stream-decoder.go | 7 lat temu | |
stream-encoder.go | 7 lat temu |
This folder contains usage examples of the Reed-Solomon encoder.
Shows basic use of the encoder, and will encode a single file into a number of data and parity shards. This is meant as an example and is not meant for production use since there is a number of shotcomings noted below.
To build an executable use:
go build simple-decoder.go
go build simple-encoder.go
There are streaming examples of the same functionality, which streams data instead of keeping it in memory.
To build the executables use:
go build stream-decoder.go
go build stream-encoder.go
The solution for this is to save a metadata file containing:
If you save these properties, you should abe able to detect file corruption in a shard and be able to reconstruct your data if you have the needed number of shards left.