Skip to content

amadeus-robot/reedsolomon_ex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reedsolomon_ex

Reed Solomon Rustler bindings for Elixir

How

Use it like

msg = :crypto.strong_rand_bytes(1024*3)
shards = 3
shards_recovery = 3
shard_size = 1024

r = ReedSolomonEx.create_resource(shards, shards_recovery, shard_size)
frags = ReedSolomonEx.encode_shards(r, msg)
true = msg == ReedSolomonEx.decode_shards(r, frags, shards+shards_recovery, byte_size(msg))

msg = :crypto.strong_rand_bytes(1024*3)
frags = ReedSolomonEx.encode_shards(r, msg)
true = msg == ReedSolomonEx.decode_shards(r, frags, shards+shards_recovery, byte_size(msg))

msg = :crypto.strong_rand_bytes(1024*3)
frags = ReedSolomonEx.encode_shards(r, msg)
true = msg == ReedSolomonEx.decode_shards(r, frags, shards+shards_recovery, byte_size(msg))

About

Reed Solomon Rustler bindings for Elixir

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published