init: v1.0.0
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package encoding
|
||||
|
||||
// encoding 定义gcl中用到的marshaler
|
||||
|
||||
type UtilMarshaler interface {
|
||||
|
||||
// MarshalUtil append the marshaled data to data and return the appended data.
|
||||
// The input data coulde be nil. If any error happens, returned []byte is the
|
||||
// same as input data. The returned []byte may be re-allocate memory.
|
||||
MarshalUtil(data []byte) ([]byte, error)
|
||||
}
|
||||
|
||||
type UtilUnmarshaler interface {
|
||||
// UnmarshalUtil unmarshal from data, and return the total consumed bytes.
|
||||
UnmarshalUtil(data []byte) (uint64, error)
|
||||
}
|
||||
Reference in New Issue
Block a user