mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-08-17 20:20:35 +00:00
fix: reed_solomon_vcn decode_rs return type (tuple → bytes extraction)
This commit is contained in:
parent
a89b475f6b
commit
fb58e2c156
1 changed files with 2 additions and 1 deletions
|
|
@ -115,7 +115,8 @@ def decode_rs(encoded_data: bytes, nsym: int = 32) -> Tuple[bytes, int]:
|
||||||
"""
|
"""
|
||||||
codec = reedsolo.RSCodec(nsym)
|
codec = reedsolo.RSCodec(nsym)
|
||||||
decoded, _, errata_pos = codec.decode(encoded_data)
|
decoded, _, errata_pos = codec.decode(encoded_data)
|
||||||
return bytes(decoded), len(errata_pos) if errata_pos else 0
|
corrections = len(errata_pos) if errata_pos else 0
|
||||||
|
return bytes(decoded), corrections
|
||||||
|
|
||||||
|
|
||||||
def protect_frame(frame_bytes: bytes, redundancy_factor: int = 2) -> bytes:
|
def protect_frame(frame_bytes: bytes, redundancy_factor: int = 2) -> bytes:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue