Yeecy
May 11, 2022

--

使用 unireedsolomon 足矣,我猜你得到的輸出是正確的,只是不太清楚 character 和 int 之間要如何轉換而已。

下面的程式碼可供參考。

>>> import unireedsolomon as rs
>>> coder = rs.RSCoder(26, 13, generator=2, prim=0x11D, fcr=0, c_exp=8)
>>> message = [32, 46, 8, 80, 81, 0, 236, 17, 236, 17, 236, 17, 236]
>>> list(map(lambda x: ord(x), coder.encode(message)[:13]))
[32, 46, 8, 80, 81, 0, 236, 17, 236, 17, 236, 17, 236]

--

--

Yeecy
Yeecy

Written by Yeecy

A Ph.D. student at NYCU CS and a compiler engineer at ICEshell Co., Ltd. You can find more information about me on my GitHub page github.com/ADNRs.

Responses (1)