Documentation ¶
Overview ¶
Package io offers serialization interfaces for gnark objects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RoundTripCheck ¶ added in v0.9.0
RoundTripCheck is a helper to check that a serialization round trip is correct. It writes the object to a buffer, then reads it back and checks that the reconstructed object is equal to the original. It supports both io.ReaderFrom and UnsafeReaderFrom interfaces (to object) It also supports both io.WriterTo and WriterRawTo interfaces (from object)
Types ¶
type UnsafeReaderFrom ¶ added in v0.5.2
UnsafeReaderFrom is the interface that wraps the UnsafeReadFrom method.
UnsafeReadFrom reads data from reader but doesn't perform any checks, such as subgroup checks for elliptic curves points for example.
type WriterRawTo ¶ added in v0.3.6
WriterRawTo is the interface that wraps the WriteRawTo method.
WriteRawTo writes data to w until there's no more data to write or when an error occurs. The return value n is the number of bytes written. Any error encountered during the write is also returned.
WriteRawTo will not compress the data (as opposed to WriteTo)