Live data from Hacker News

Create your own erasure code

hackthe.computer

1–10 of 11 posts

Re: Create your own erasure code

#8
What if the parity bytes exceed 255? I'm assuming this is done with modular arithmetic, but does mod math work to recover missing data from the parity bits without trial and error? (i.e. is the recovery function a one-to-one mapping in reverse?)

I'm not well-versed in modular arithmetic, so excuse me if the answer is obvious to those that are.

Re: Create your own erasure code

#9

What if the parity bytes exceed 255? I'm assuming this is done with modular arithmetic, but does mod math work to recover missing data from the parity bits without trial and error? (i.e. is the recovery function a one-to-one mapping in reverse?) I'm not well-versed in modular arithmetic, so excuse me if the answer is obvious to those that are.

For this particular case, this is not done using modular arithmetic. The parity values are simply rational - they might be fractional, negative, larger than 255, etc.

This erasure code is not at all optimal; it only serves to teach the basics of how one could work. In practice you'll definitely want a Galois Field or something.

Re: Create your own erasure code

#10
post #9

What if the parity bytes exceed 255? I'm assuming this is done with modular arithmetic, but does mod math work to recover missing data from the parity bits without trial and error? (i.e. is the recovery function a one-to-one mapping in reverse?) I'm not well-versed in modular arithmetic, so excuse me if the answer is obvious to those that are.

For this particular case, this is not done using modular arithmetic. The parity values are simply rational - they might be fractional, negative, larger than 255, etc. This erasure code is not at all optimal; it only serves to teach the basics of how one could work. In practice you'll definitely want a Galois Field or something.

Pardon my ignorance, but how would a system using a Galois Field work? All this stuff is really interesting to me.
Post reply on HN