Introduce tests to verify `MarshalBinary` and `UnmarshalBinary` behavior, covering block boundary cases, data integrity after state restoration, and error handling for invalid inputs. These tests ensure correctness for diverse data sizes, edge cases, and error scenarios.