I'm making a code to encode the 10MB Binary Data using Reed-Solomon Code.
But, the module throws the error about message length like the following warning.
ValueError: Message is too long (10032003 when max is 255)
I've tried to understand the library's codes though, I couldn't understand the purpose of the codes.
Can you help me handle this problem?
This is the Reed-Solomon Module when I make the following codes.
The following codes is some parts of the code that I've made.
import time
import reedsolo as rs
def encoding(per, msg, n, nsym, gen):
time = 0
count = 0
rs.init_tables(0x11d)
while time < per:
temp = time.time()
rs.rs_encode_msg(msg, nsym, gen=gen[nsym])
time += time.time() - temp
count += 1
def main():
data = b"<SOME TEXT>"*5500 #This data size is 10MB
n = 8
nsym = 3 # I wanted RS(8,3)
period = 10
gen = rs._rs_generator_poly_all(n)
encoding(period, data, 8, 3, gen)