This type adds support for describing all of the things in a data stream header as described in #46 .
Fill out stub for type Format struct, with most fields unexported.
Create a new function, V1(), which accepts no parameters and returns a Format that represents the old style data format, compatible with reading non-headered rezi data streams all the way back to Rezi v1.x.y.
Create a new function, V2(), which accepts parameters related to compression and returns a Format that represents the new style data format.
Add Format.MarshalBinary for encoding it as bytes. It must return empty bytes for V1 formats.
Add Format.UnmarshalBinary for decoding it from bytes. It must accept empty bytes and return a V1 if so.
This should be a new type that is not created by hand - function V2() creates a new format in the new one and accepts any parameters that would be given. Function V1() is how a Format representing the old format is obtained and will be used by default by any routines that are modified to accept an optional Format.
This type adds support for describing all of the things in a data stream header as described in #46 .
type Format struct
, with most fields unexported.V1()
, which accepts no parameters and returns a Format that represents the old style data format, compatible with reading non-headered rezi data streams all the way back to Rezi v1.x.y.V2()
, which accepts parameters related to compression and returns a Format that represents the new style data format.Format.MarshalBinary
for encoding it as bytes. It must return empty bytes for V1 formats.Format.UnmarshalBinary
for decoding it from bytes. It must accept empty bytes and return a V1 if so.This should be a new type that is not created by hand - function
V2()
creates a new format in the new one and accepts any parameters that would be given. FunctionV1()
is how aFormat
representing the old format is obtained and will be used by default by any routines that are modified to accept an optionalFormat
.