Documentation ¶
Overview ¶
Package io offers serialization interfaces for gnark objects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpRoundTripCheck ¶
func RoundTripCheck ¶
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 BinaryDumper ¶
BinaryDumper is the interface that wraps the WriteDump and ReadDump methods. WriteDump writes the object to w, ReadDump reads the object from r. The object is serialized in binary format, in a very fast, very unsafe way.
type UnsafeReaderFrom ¶
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 ¶
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)