2020-06-12 23:04:01 -04:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
// Code generated by github.com/tinylib/msgp DO NOT EDIT.
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/tinylib/msgp/msgp"
|
|
|
|
)
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *ChecksumAlgo) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
{
|
|
|
|
var zb0001 uint8
|
|
|
|
zb0001, err = dc.ReadUint8()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
(*z) = ChecksumAlgo(zb0001)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z ChecksumAlgo) EncodeMsg(en *msgp.Writer) (err error) {
|
|
|
|
err = en.WriteUint8(uint8(z))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z ChecksumAlgo) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
|
|
|
o = msgp.AppendUint8(o, uint8(z))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *ChecksumAlgo) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
{
|
|
|
|
var zb0001 uint8
|
|
|
|
zb0001, bts, err = msgp.ReadUint8Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
(*z) = ChecksumAlgo(zb0001)
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z ChecksumAlgo) Msgsize() (s int) {
|
|
|
|
s = msgp.Uint8Size
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *ErasureAlgo) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
{
|
|
|
|
var zb0001 uint8
|
|
|
|
zb0001, err = dc.ReadUint8()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
(*z) = ErasureAlgo(zb0001)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z ErasureAlgo) EncodeMsg(en *msgp.Writer) (err error) {
|
|
|
|
err = en.WriteUint8(uint8(z))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z ErasureAlgo) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
|
|
|
o = msgp.AppendUint8(o, uint8(z))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *ErasureAlgo) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
{
|
|
|
|
var zb0001 uint8
|
|
|
|
zb0001, bts, err = msgp.ReadUint8Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
(*z) = ErasureAlgo(zb0001)
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z ErasureAlgo) Msgsize() (s int) {
|
|
|
|
s = msgp.Uint8Size
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *VersionType) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
{
|
|
|
|
var zb0001 uint8
|
|
|
|
zb0001, err = dc.ReadUint8()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
(*z) = VersionType(zb0001)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z VersionType) EncodeMsg(en *msgp.Writer) (err error) {
|
|
|
|
err = en.WriteUint8(uint8(z))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z VersionType) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
|
|
|
o = msgp.AppendUint8(o, uint8(z))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *VersionType) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
{
|
|
|
|
var zb0001 uint8
|
|
|
|
zb0001, bts, err = msgp.ReadUint8Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
(*z) = VersionType(zb0001)
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z VersionType) Msgsize() (s int) {
|
|
|
|
s = msgp.Uint8Size
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
2021-11-18 15:15:22 -05:00
|
|
|
func (z *xlFlags) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
{
|
|
|
|
var zb0001 uint8
|
|
|
|
zb0001, err = dc.ReadUint8()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
(*z) = xlFlags(zb0001)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z xlFlags) EncodeMsg(en *msgp.Writer) (err error) {
|
|
|
|
err = en.WriteUint8(uint8(z))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z xlFlags) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
|
|
|
o = msgp.AppendUint8(o, uint8(z))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *xlFlags) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
{
|
|
|
|
var zb0001 uint8
|
|
|
|
zb0001, bts, err = msgp.ReadUint8Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
(*z) = xlFlags(zb0001)
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z xlFlags) Msgsize() (s int) {
|
|
|
|
s = msgp.Uint8Size
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *xlMetaBuf) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
{
|
|
|
|
var zb0001 []byte
|
|
|
|
zb0001, err = dc.ReadBytes([]byte((*z)))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
(*z) = xlMetaBuf(zb0001)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z xlMetaBuf) EncodeMsg(en *msgp.Writer) (err error) {
|
|
|
|
err = en.WriteBytes([]byte(z))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z xlMetaBuf) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
|
|
|
o = msgp.AppendBytes(o, []byte(z))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *xlMetaBuf) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
{
|
|
|
|
var zb0001 []byte
|
|
|
|
zb0001, bts, err = msgp.ReadBytesBytes(bts, []byte((*z)))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
(*z) = xlMetaBuf(zb0001)
|
|
|
|
}
|
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z xlMetaBuf) Msgsize() (s int) {
|
|
|
|
s = msgp.BytesPrefixSize + len([]byte(z))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *xlMetaDataDirDecoder) DecodeMsg(dc *msgp.Reader) (err error) {
|
2020-06-12 23:04:01 -04:00
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadMapHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
var zb0001Mask uint8 /* 1 bits */
|
|
|
|
_ = zb0001Mask
|
2020-06-12 23:04:01 -04:00
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, err = dc.ReadMapKeyPtr()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
2021-11-18 15:15:22 -05:00
|
|
|
case "V2Obj":
|
|
|
|
if dc.IsNil() {
|
|
|
|
err = dc.ReadNil()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjectV2")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ObjectV2 = nil
|
2020-06-12 23:04:01 -04:00
|
|
|
} else {
|
2021-11-18 15:15:22 -05:00
|
|
|
if z.ObjectV2 == nil {
|
|
|
|
z.ObjectV2 = new(struct {
|
|
|
|
DataDir [16]byte `msg:"DDir"`
|
|
|
|
})
|
|
|
|
}
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, err = dc.ReadMapHeader()
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
2021-11-18 15:15:22 -05:00
|
|
|
err = msgp.WrapError(err, "ObjectV2")
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
for zb0002 > 0 {
|
|
|
|
zb0002--
|
|
|
|
field, err = dc.ReadMapKeyPtr()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjectV2")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "DDir":
|
|
|
|
err = dc.ReadExactBytes((z.ObjectV2.DataDir)[:])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjectV2", "DataDir")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjectV2")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
zb0001Mask |= 0x1
|
2020-06-12 23:04:01 -04:00
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
// Clear omitted fields.
|
|
|
|
if zb0001Mask != 0x1 {
|
|
|
|
if (zb0001Mask & 0x1) == 0 {
|
|
|
|
z.ObjectV2 = nil
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
2021-11-18 15:15:22 -05:00
|
|
|
func (z *xlMetaDataDirDecoder) EncodeMsg(en *msgp.Writer) (err error) {
|
2024-03-21 13:21:35 -04:00
|
|
|
// check for omitted fields
|
2021-11-18 15:15:22 -05:00
|
|
|
zb0001Len := uint32(1)
|
|
|
|
var zb0001Mask uint8 /* 1 bits */
|
2022-08-31 15:28:03 -04:00
|
|
|
_ = zb0001Mask
|
2021-11-18 15:15:22 -05:00
|
|
|
if z.ObjectV2 == nil {
|
|
|
|
zb0001Len--
|
|
|
|
zb0001Mask |= 0x1
|
|
|
|
}
|
|
|
|
// variable map header, size zb0001Len
|
|
|
|
err = en.Append(0x80 | uint8(zb0001Len))
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
if zb0001Len == 0 {
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
2024-03-21 13:21:35 -04:00
|
|
|
if (zb0001Mask & 0x1) == 0 { // if not omitted
|
2021-11-18 15:15:22 -05:00
|
|
|
// write "V2Obj"
|
|
|
|
err = en.Append(0xa5, 0x56, 0x32, 0x4f, 0x62, 0x6a)
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
if z.ObjectV2 == nil {
|
|
|
|
err = en.WriteNil()
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
// map header, size 1
|
|
|
|
// write "DDir"
|
|
|
|
err = en.Append(0x81, 0xa4, 0x44, 0x44, 0x69, 0x72)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteBytes((z.ObjectV2.DataDir)[:])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjectV2", "DataDir")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
2021-11-18 15:15:22 -05:00
|
|
|
func (z *xlMetaDataDirDecoder) MarshalMsg(b []byte) (o []byte, err error) {
|
2020-06-12 23:04:01 -04:00
|
|
|
o = msgp.Require(b, z.Msgsize())
|
2024-03-21 13:21:35 -04:00
|
|
|
// check for omitted fields
|
2021-11-18 15:15:22 -05:00
|
|
|
zb0001Len := uint32(1)
|
|
|
|
var zb0001Mask uint8 /* 1 bits */
|
2022-08-31 15:28:03 -04:00
|
|
|
_ = zb0001Mask
|
2021-11-18 15:15:22 -05:00
|
|
|
if z.ObjectV2 == nil {
|
|
|
|
zb0001Len--
|
|
|
|
zb0001Mask |= 0x1
|
|
|
|
}
|
|
|
|
// variable map header, size zb0001Len
|
|
|
|
o = append(o, 0x80|uint8(zb0001Len))
|
|
|
|
if zb0001Len == 0 {
|
|
|
|
return
|
|
|
|
}
|
2024-03-21 13:21:35 -04:00
|
|
|
if (zb0001Mask & 0x1) == 0 { // if not omitted
|
2021-11-18 15:15:22 -05:00
|
|
|
// string "V2Obj"
|
|
|
|
o = append(o, 0xa5, 0x56, 0x32, 0x4f, 0x62, 0x6a)
|
|
|
|
if z.ObjectV2 == nil {
|
|
|
|
o = msgp.AppendNil(o)
|
|
|
|
} else {
|
|
|
|
// map header, size 1
|
|
|
|
// string "DDir"
|
|
|
|
o = append(o, 0x81, 0xa4, 0x44, 0x44, 0x69, 0x72)
|
|
|
|
o = msgp.AppendBytes(o, (z.ObjectV2.DataDir)[:])
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
2021-11-18 15:15:22 -05:00
|
|
|
func (z *xlMetaDataDirDecoder) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
2020-06-12 23:04:01 -04:00
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
var zb0001Mask uint8 /* 1 bits */
|
|
|
|
_ = zb0001Mask
|
2020-06-12 23:04:01 -04:00
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
2021-11-18 15:15:22 -05:00
|
|
|
case "V2Obj":
|
|
|
|
if msgp.IsNil(bts) {
|
|
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ObjectV2 = nil
|
2020-06-12 23:04:01 -04:00
|
|
|
} else {
|
2021-11-18 15:15:22 -05:00
|
|
|
if z.ObjectV2 == nil {
|
|
|
|
z.ObjectV2 = new(struct {
|
|
|
|
DataDir [16]byte `msg:"DDir"`
|
|
|
|
})
|
|
|
|
}
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadMapHeaderBytes(bts)
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
2021-11-18 15:15:22 -05:00
|
|
|
err = msgp.WrapError(err, "ObjectV2")
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
for zb0002 > 0 {
|
|
|
|
zb0002--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjectV2")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "DDir":
|
|
|
|
bts, err = msgp.ReadExactBytes(bts, (z.ObjectV2.DataDir)[:])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjectV2", "DataDir")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjectV2")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
zb0001Mask |= 0x1
|
2020-06-12 23:04:01 -04:00
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
// Clear omitted fields.
|
|
|
|
if zb0001Mask != 0x1 {
|
|
|
|
if (zb0001Mask & 0x1) == 0 {
|
|
|
|
z.ObjectV2 = nil
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
2021-11-18 15:15:22 -05:00
|
|
|
func (z *xlMetaDataDirDecoder) Msgsize() (s int) {
|
|
|
|
s = 1 + 6
|
|
|
|
if z.ObjectV2 == nil {
|
|
|
|
s += msgp.NilSize
|
|
|
|
} else {
|
|
|
|
s += 1 + 5 + msgp.ArrayHeaderSize + (16 * (msgp.ByteSize))
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *xlMetaV2DeleteMarker) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadMapHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
var zb0001Mask uint8 /* 1 bits */
|
|
|
|
_ = zb0001Mask
|
2020-06-12 23:04:01 -04:00
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, err = dc.ReadMapKeyPtr()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "ID":
|
|
|
|
err = dc.ReadExactBytes((z.VersionID)[:])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "VersionID")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "MTime":
|
|
|
|
z.ModTime, err = dc.ReadInt64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ModTime")
|
|
|
|
return
|
|
|
|
}
|
2020-11-19 21:43:58 -05:00
|
|
|
case "MetaSys":
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, err = dc.ReadMapHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaSys")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.MetaSys == nil {
|
|
|
|
z.MetaSys = make(map[string][]byte, zb0002)
|
|
|
|
} else if len(z.MetaSys) > 0 {
|
|
|
|
for key := range z.MetaSys {
|
|
|
|
delete(z.MetaSys, key)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for zb0002 > 0 {
|
|
|
|
zb0002--
|
|
|
|
var za0002 string
|
|
|
|
var za0003 []byte
|
|
|
|
za0002, err = dc.ReadString()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaSys")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
za0003, err = dc.ReadBytes(za0003)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaSys", za0002)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.MetaSys[za0002] = za0003
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
zb0001Mask |= 0x1
|
2020-06-12 23:04:01 -04:00
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
// Clear omitted fields.
|
|
|
|
if zb0001Mask != 0x1 {
|
|
|
|
if (zb0001Mask & 0x1) == 0 {
|
|
|
|
z.MetaSys = nil
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z *xlMetaV2DeleteMarker) EncodeMsg(en *msgp.Writer) (err error) {
|
2024-03-21 13:21:35 -04:00
|
|
|
// check for omitted fields
|
2020-11-19 21:43:58 -05:00
|
|
|
zb0001Len := uint32(3)
|
|
|
|
var zb0001Mask uint8 /* 3 bits */
|
2022-08-31 15:28:03 -04:00
|
|
|
_ = zb0001Mask
|
2020-11-19 21:43:58 -05:00
|
|
|
if z.MetaSys == nil {
|
|
|
|
zb0001Len--
|
|
|
|
zb0001Mask |= 0x4
|
|
|
|
}
|
|
|
|
// variable map header, size zb0001Len
|
|
|
|
err = en.Append(0x80 | uint8(zb0001Len))
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0001Len == 0 {
|
|
|
|
return
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
// write "ID"
|
2020-11-19 21:43:58 -05:00
|
|
|
err = en.Append(0xa2, 0x49, 0x44)
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteBytes((z.VersionID)[:])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "VersionID")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// write "MTime"
|
|
|
|
err = en.Append(0xa5, 0x4d, 0x54, 0x69, 0x6d, 0x65)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteInt64(z.ModTime)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ModTime")
|
|
|
|
return
|
|
|
|
}
|
2024-03-21 13:21:35 -04:00
|
|
|
if (zb0001Mask & 0x4) == 0 { // if not omitted
|
2020-11-19 21:43:58 -05:00
|
|
|
// write "MetaSys"
|
|
|
|
err = en.Append(0xa7, 0x4d, 0x65, 0x74, 0x61, 0x53, 0x79, 0x73)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteMapHeader(uint32(len(z.MetaSys)))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaSys")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0002, za0003 := range z.MetaSys {
|
|
|
|
err = en.WriteString(za0002)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaSys")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteBytes(za0003)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaSys", za0002)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z *xlMetaV2DeleteMarker) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
2024-03-21 13:21:35 -04:00
|
|
|
// check for omitted fields
|
2020-11-19 21:43:58 -05:00
|
|
|
zb0001Len := uint32(3)
|
|
|
|
var zb0001Mask uint8 /* 3 bits */
|
2022-08-31 15:28:03 -04:00
|
|
|
_ = zb0001Mask
|
2020-11-19 21:43:58 -05:00
|
|
|
if z.MetaSys == nil {
|
|
|
|
zb0001Len--
|
|
|
|
zb0001Mask |= 0x4
|
|
|
|
}
|
|
|
|
// variable map header, size zb0001Len
|
|
|
|
o = append(o, 0x80|uint8(zb0001Len))
|
|
|
|
if zb0001Len == 0 {
|
|
|
|
return
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
// string "ID"
|
2020-11-19 21:43:58 -05:00
|
|
|
o = append(o, 0xa2, 0x49, 0x44)
|
2020-06-12 23:04:01 -04:00
|
|
|
o = msgp.AppendBytes(o, (z.VersionID)[:])
|
|
|
|
// string "MTime"
|
|
|
|
o = append(o, 0xa5, 0x4d, 0x54, 0x69, 0x6d, 0x65)
|
|
|
|
o = msgp.AppendInt64(o, z.ModTime)
|
2024-03-21 13:21:35 -04:00
|
|
|
if (zb0001Mask & 0x4) == 0 { // if not omitted
|
2020-11-19 21:43:58 -05:00
|
|
|
// string "MetaSys"
|
|
|
|
o = append(o, 0xa7, 0x4d, 0x65, 0x74, 0x61, 0x53, 0x79, 0x73)
|
|
|
|
o = msgp.AppendMapHeader(o, uint32(len(z.MetaSys)))
|
|
|
|
for za0002, za0003 := range z.MetaSys {
|
|
|
|
o = msgp.AppendString(o, za0002)
|
|
|
|
o = msgp.AppendBytes(o, za0003)
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *xlMetaV2DeleteMarker) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
var zb0001Mask uint8 /* 1 bits */
|
|
|
|
_ = zb0001Mask
|
2020-06-12 23:04:01 -04:00
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "ID":
|
|
|
|
bts, err = msgp.ReadExactBytes(bts, (z.VersionID)[:])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "VersionID")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "MTime":
|
|
|
|
z.ModTime, bts, err = msgp.ReadInt64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ModTime")
|
|
|
|
return
|
|
|
|
}
|
2020-11-19 21:43:58 -05:00
|
|
|
case "MetaSys":
|
|
|
|
var zb0002 uint32
|
|
|
|
zb0002, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaSys")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.MetaSys == nil {
|
|
|
|
z.MetaSys = make(map[string][]byte, zb0002)
|
|
|
|
} else if len(z.MetaSys) > 0 {
|
|
|
|
for key := range z.MetaSys {
|
|
|
|
delete(z.MetaSys, key)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for zb0002 > 0 {
|
|
|
|
var za0002 string
|
|
|
|
var za0003 []byte
|
|
|
|
zb0002--
|
|
|
|
za0002, bts, err = msgp.ReadStringBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaSys")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
za0003, bts, err = msgp.ReadBytesBytes(bts, za0003)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaSys", za0002)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.MetaSys[za0002] = za0003
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
zb0001Mask |= 0x1
|
2020-06-12 23:04:01 -04:00
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
// Clear omitted fields.
|
|
|
|
if zb0001Mask != 0x1 {
|
|
|
|
if (zb0001Mask & 0x1) == 0 {
|
|
|
|
z.MetaSys = nil
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *xlMetaV2DeleteMarker) Msgsize() (s int) {
|
2020-11-19 21:43:58 -05:00
|
|
|
s = 1 + 3 + msgp.ArrayHeaderSize + (16 * (msgp.ByteSize)) + 6 + msgp.Int64Size + 8 + msgp.MapHeaderSize
|
|
|
|
if z.MetaSys != nil {
|
|
|
|
for za0002, za0003 := range z.MetaSys {
|
|
|
|
_ = za0003
|
|
|
|
s += msgp.StringPrefixSize + len(za0002) + msgp.BytesPrefixSize + len(za0003)
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *xlMetaV2Object) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadMapHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
var zb0001Mask uint8 /* 1 bits */
|
|
|
|
_ = zb0001Mask
|
2020-06-12 23:04:01 -04:00
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, err = dc.ReadMapKeyPtr()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "ID":
|
|
|
|
err = dc.ReadExactBytes((z.VersionID)[:])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "VersionID")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "DDir":
|
|
|
|
err = dc.ReadExactBytes((z.DataDir)[:])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "DataDir")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "EcAlgo":
|
|
|
|
{
|
|
|
|
var zb0002 uint8
|
|
|
|
zb0002, err = dc.ReadUint8()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureAlgorithm")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ErasureAlgorithm = ErasureAlgo(zb0002)
|
|
|
|
}
|
|
|
|
case "EcM":
|
|
|
|
z.ErasureM, err = dc.ReadInt()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureM")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "EcN":
|
|
|
|
z.ErasureN, err = dc.ReadInt()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureN")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "EcBSize":
|
|
|
|
z.ErasureBlockSize, err = dc.ReadInt64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureBlockSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "EcIndex":
|
|
|
|
z.ErasureIndex, err = dc.ReadInt()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureIndex")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "EcDist":
|
|
|
|
var zb0003 uint32
|
|
|
|
zb0003, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureDist")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if cap(z.ErasureDist) >= int(zb0003) {
|
|
|
|
z.ErasureDist = (z.ErasureDist)[:zb0003]
|
|
|
|
} else {
|
|
|
|
z.ErasureDist = make([]uint8, zb0003)
|
|
|
|
}
|
|
|
|
for za0003 := range z.ErasureDist {
|
|
|
|
z.ErasureDist[za0003], err = dc.ReadUint8()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureDist", za0003)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "CSumAlgo":
|
|
|
|
{
|
|
|
|
var zb0004 uint8
|
|
|
|
zb0004, err = dc.ReadUint8()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "BitrotChecksumAlgo")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.BitrotChecksumAlgo = ChecksumAlgo(zb0004)
|
|
|
|
}
|
|
|
|
case "PartNums":
|
|
|
|
var zb0005 uint32
|
|
|
|
zb0005, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartNumbers")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if cap(z.PartNumbers) >= int(zb0005) {
|
|
|
|
z.PartNumbers = (z.PartNumbers)[:zb0005]
|
|
|
|
} else {
|
|
|
|
z.PartNumbers = make([]int, zb0005)
|
|
|
|
}
|
|
|
|
for za0004 := range z.PartNumbers {
|
|
|
|
z.PartNumbers[za0004], err = dc.ReadInt()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartNumbers", za0004)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "PartETags":
|
2021-11-18 15:15:22 -05:00
|
|
|
if dc.IsNil() {
|
|
|
|
err = dc.ReadNil()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartETags")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.PartETags = nil
|
2020-06-12 23:04:01 -04:00
|
|
|
} else {
|
2021-11-18 15:15:22 -05:00
|
|
|
var zb0006 uint32
|
|
|
|
zb0006, err = dc.ReadArrayHeader()
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
2021-11-18 15:15:22 -05:00
|
|
|
err = msgp.WrapError(err, "PartETags")
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
2024-03-21 13:21:35 -04:00
|
|
|
if z.PartETags != nil && cap(z.PartETags) >= int(zb0006) {
|
2021-11-18 15:15:22 -05:00
|
|
|
z.PartETags = (z.PartETags)[:zb0006]
|
|
|
|
} else {
|
|
|
|
z.PartETags = make([]string, zb0006)
|
|
|
|
}
|
|
|
|
for za0005 := range z.PartETags {
|
|
|
|
z.PartETags[za0005], err = dc.ReadString()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartETags", za0005)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
|
|
|
case "PartSizes":
|
|
|
|
var zb0007 uint32
|
|
|
|
zb0007, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartSizes")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if cap(z.PartSizes) >= int(zb0007) {
|
|
|
|
z.PartSizes = (z.PartSizes)[:zb0007]
|
|
|
|
} else {
|
|
|
|
z.PartSizes = make([]int64, zb0007)
|
|
|
|
}
|
|
|
|
for za0006 := range z.PartSizes {
|
|
|
|
z.PartSizes[za0006], err = dc.ReadInt64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartSizes", za0006)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "PartASizes":
|
2021-11-18 15:15:22 -05:00
|
|
|
if dc.IsNil() {
|
|
|
|
err = dc.ReadNil()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartActualSizes")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.PartActualSizes = nil
|
2020-06-12 23:04:01 -04:00
|
|
|
} else {
|
2021-11-18 15:15:22 -05:00
|
|
|
var zb0008 uint32
|
|
|
|
zb0008, err = dc.ReadArrayHeader()
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
2021-11-18 15:15:22 -05:00
|
|
|
err = msgp.WrapError(err, "PartActualSizes")
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
2024-03-21 13:21:35 -04:00
|
|
|
if z.PartActualSizes != nil && cap(z.PartActualSizes) >= int(zb0008) {
|
2021-11-18 15:15:22 -05:00
|
|
|
z.PartActualSizes = (z.PartActualSizes)[:zb0008]
|
|
|
|
} else {
|
|
|
|
z.PartActualSizes = make([]int64, zb0008)
|
|
|
|
}
|
|
|
|
for za0007 := range z.PartActualSizes {
|
|
|
|
z.PartActualSizes[za0007], err = dc.ReadInt64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartActualSizes", za0007)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
2022-07-11 20:30:56 -04:00
|
|
|
case "PartIdx":
|
|
|
|
var zb0009 uint32
|
|
|
|
zb0009, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartIndices")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if cap(z.PartIndices) >= int(zb0009) {
|
|
|
|
z.PartIndices = (z.PartIndices)[:zb0009]
|
|
|
|
} else {
|
|
|
|
z.PartIndices = make([][]byte, zb0009)
|
|
|
|
}
|
|
|
|
for za0008 := range z.PartIndices {
|
|
|
|
z.PartIndices[za0008], err = dc.ReadBytes(z.PartIndices[za0008])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartIndices", za0008)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
zb0001Mask |= 0x1
|
2020-06-12 23:04:01 -04:00
|
|
|
case "Size":
|
2020-07-04 15:25:53 -04:00
|
|
|
z.Size, err = dc.ReadInt64()
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
2020-07-04 15:25:53 -04:00
|
|
|
err = msgp.WrapError(err, "Size")
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
case "MTime":
|
2020-07-04 15:25:53 -04:00
|
|
|
z.ModTime, err = dc.ReadInt64()
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
2020-07-04 15:25:53 -04:00
|
|
|
err = msgp.WrapError(err, "ModTime")
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
case "MetaSys":
|
2021-11-18 15:15:22 -05:00
|
|
|
if dc.IsNil() {
|
|
|
|
err = dc.ReadNil()
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaSys")
|
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
z.MetaSys = nil
|
|
|
|
} else {
|
2022-07-11 20:30:56 -04:00
|
|
|
var zb0010 uint32
|
|
|
|
zb0010, err = dc.ReadMapHeader()
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
2021-11-18 15:15:22 -05:00
|
|
|
err = msgp.WrapError(err, "MetaSys")
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
if z.MetaSys == nil {
|
2022-07-11 20:30:56 -04:00
|
|
|
z.MetaSys = make(map[string][]byte, zb0010)
|
2021-11-18 15:15:22 -05:00
|
|
|
} else if len(z.MetaSys) > 0 {
|
|
|
|
for key := range z.MetaSys {
|
|
|
|
delete(z.MetaSys, key)
|
|
|
|
}
|
|
|
|
}
|
2022-07-11 20:30:56 -04:00
|
|
|
for zb0010 > 0 {
|
|
|
|
zb0010--
|
|
|
|
var za0009 string
|
|
|
|
var za0010 []byte
|
|
|
|
za0009, err = dc.ReadString()
|
2021-11-18 15:15:22 -05:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaSys")
|
|
|
|
return
|
|
|
|
}
|
2022-07-11 20:30:56 -04:00
|
|
|
za0010, err = dc.ReadBytes(za0010)
|
2021-11-18 15:15:22 -05:00
|
|
|
if err != nil {
|
2022-07-11 20:30:56 -04:00
|
|
|
err = msgp.WrapError(err, "MetaSys", za0009)
|
2021-11-18 15:15:22 -05:00
|
|
|
return
|
|
|
|
}
|
2022-07-11 20:30:56 -04:00
|
|
|
z.MetaSys[za0009] = za0010
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
case "MetaUsr":
|
|
|
|
if dc.IsNil() {
|
|
|
|
err = dc.ReadNil()
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaUser")
|
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
z.MetaUser = nil
|
|
|
|
} else {
|
2022-07-11 20:30:56 -04:00
|
|
|
var zb0011 uint32
|
|
|
|
zb0011, err = dc.ReadMapHeader()
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
2021-11-18 15:15:22 -05:00
|
|
|
err = msgp.WrapError(err, "MetaUser")
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
if z.MetaUser == nil {
|
2022-07-11 20:30:56 -04:00
|
|
|
z.MetaUser = make(map[string]string, zb0011)
|
2021-11-18 15:15:22 -05:00
|
|
|
} else if len(z.MetaUser) > 0 {
|
|
|
|
for key := range z.MetaUser {
|
|
|
|
delete(z.MetaUser, key)
|
|
|
|
}
|
|
|
|
}
|
2022-07-11 20:30:56 -04:00
|
|
|
for zb0011 > 0 {
|
|
|
|
zb0011--
|
2021-11-18 15:15:22 -05:00
|
|
|
var za0011 string
|
2022-07-11 20:30:56 -04:00
|
|
|
var za0012 string
|
|
|
|
za0011, err = dc.ReadString()
|
2021-11-18 15:15:22 -05:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaUser")
|
|
|
|
return
|
|
|
|
}
|
2022-07-11 20:30:56 -04:00
|
|
|
za0012, err = dc.ReadString()
|
2021-11-18 15:15:22 -05:00
|
|
|
if err != nil {
|
2022-07-11 20:30:56 -04:00
|
|
|
err = msgp.WrapError(err, "MetaUser", za0011)
|
2021-11-18 15:15:22 -05:00
|
|
|
return
|
|
|
|
}
|
2022-07-11 20:30:56 -04:00
|
|
|
z.MetaUser[za0011] = za0012
|
2021-11-18 15:15:22 -05:00
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
// Clear omitted fields.
|
|
|
|
if zb0001Mask != 0x1 {
|
|
|
|
if (zb0001Mask & 0x1) == 0 {
|
|
|
|
z.PartIndices = nil
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z *xlMetaV2Object) EncodeMsg(en *msgp.Writer) (err error) {
|
2024-03-21 13:21:35 -04:00
|
|
|
// check for omitted fields
|
2022-07-11 20:30:56 -04:00
|
|
|
zb0001Len := uint32(18)
|
|
|
|
var zb0001Mask uint32 /* 18 bits */
|
2022-08-31 15:28:03 -04:00
|
|
|
_ = zb0001Mask
|
2022-07-11 20:30:56 -04:00
|
|
|
if z.PartIndices == nil {
|
|
|
|
zb0001Len--
|
|
|
|
zb0001Mask |= 0x2000
|
|
|
|
}
|
|
|
|
// variable map header, size zb0001Len
|
|
|
|
err = en.WriteMapHeader(zb0001Len)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0001Len == 0 {
|
|
|
|
return
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
// write "ID"
|
2022-07-11 20:30:56 -04:00
|
|
|
err = en.Append(0xa2, 0x49, 0x44)
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteBytes((z.VersionID)[:])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "VersionID")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// write "DDir"
|
|
|
|
err = en.Append(0xa4, 0x44, 0x44, 0x69, 0x72)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteBytes((z.DataDir)[:])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "DataDir")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// write "EcAlgo"
|
|
|
|
err = en.Append(0xa6, 0x45, 0x63, 0x41, 0x6c, 0x67, 0x6f)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint8(uint8(z.ErasureAlgorithm))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureAlgorithm")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// write "EcM"
|
|
|
|
err = en.Append(0xa3, 0x45, 0x63, 0x4d)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteInt(z.ErasureM)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureM")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// write "EcN"
|
|
|
|
err = en.Append(0xa3, 0x45, 0x63, 0x4e)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteInt(z.ErasureN)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureN")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// write "EcBSize"
|
|
|
|
err = en.Append(0xa7, 0x45, 0x63, 0x42, 0x53, 0x69, 0x7a, 0x65)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteInt64(z.ErasureBlockSize)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureBlockSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// write "EcIndex"
|
|
|
|
err = en.Append(0xa7, 0x45, 0x63, 0x49, 0x6e, 0x64, 0x65, 0x78)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteInt(z.ErasureIndex)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureIndex")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// write "EcDist"
|
|
|
|
err = en.Append(0xa6, 0x45, 0x63, 0x44, 0x69, 0x73, 0x74)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteArrayHeader(uint32(len(z.ErasureDist)))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureDist")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0003 := range z.ErasureDist {
|
|
|
|
err = en.WriteUint8(z.ErasureDist[za0003])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureDist", za0003)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// write "CSumAlgo"
|
|
|
|
err = en.Append(0xa8, 0x43, 0x53, 0x75, 0x6d, 0x41, 0x6c, 0x67, 0x6f)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint8(uint8(z.BitrotChecksumAlgo))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "BitrotChecksumAlgo")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// write "PartNums"
|
|
|
|
err = en.Append(0xa8, 0x50, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x73)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteArrayHeader(uint32(len(z.PartNumbers)))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartNumbers")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0004 := range z.PartNumbers {
|
|
|
|
err = en.WriteInt(z.PartNumbers[za0004])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartNumbers", za0004)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// write "PartETags"
|
|
|
|
err = en.Append(0xa9, 0x50, 0x61, 0x72, 0x74, 0x45, 0x54, 0x61, 0x67, 0x73)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
if z.PartETags == nil { // allownil: if nil
|
|
|
|
err = en.WriteNil()
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
} else {
|
|
|
|
err = en.WriteArrayHeader(uint32(len(z.PartETags)))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartETags")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0005 := range z.PartETags {
|
|
|
|
err = en.WriteString(z.PartETags[za0005])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartETags", za0005)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
|
|
|
// write "PartSizes"
|
|
|
|
err = en.Append(0xa9, 0x50, 0x61, 0x72, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x73)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteArrayHeader(uint32(len(z.PartSizes)))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartSizes")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0006 := range z.PartSizes {
|
|
|
|
err = en.WriteInt64(z.PartSizes[za0006])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartSizes", za0006)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
// write "PartASizes"
|
|
|
|
err = en.Append(0xaa, 0x50, 0x61, 0x72, 0x74, 0x41, 0x53, 0x69, 0x7a, 0x65, 0x73)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.PartActualSizes == nil { // allownil: if nil
|
|
|
|
err = en.WriteNil()
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
} else {
|
2020-06-12 23:04:01 -04:00
|
|
|
err = en.WriteArrayHeader(uint32(len(z.PartActualSizes)))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartActualSizes")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0007 := range z.PartActualSizes {
|
|
|
|
err = en.WriteInt64(z.PartActualSizes[za0007])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartActualSizes", za0007)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-03-21 13:21:35 -04:00
|
|
|
if (zb0001Mask & 0x2000) == 0 { // if not omitted
|
2022-07-11 20:30:56 -04:00
|
|
|
// write "PartIdx"
|
|
|
|
err = en.Append(0xa7, 0x50, 0x61, 0x72, 0x74, 0x49, 0x64, 0x78)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteArrayHeader(uint32(len(z.PartIndices)))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartIndices")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
for za0008 := range z.PartIndices {
|
|
|
|
err = en.WriteBytes(z.PartIndices[za0008])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartIndices", za0008)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
// write "Size"
|
|
|
|
err = en.Append(0xa4, 0x53, 0x69, 0x7a, 0x65)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2020-07-04 15:25:53 -04:00
|
|
|
err = en.WriteInt64(z.Size)
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
2020-07-04 15:25:53 -04:00
|
|
|
err = msgp.WrapError(err, "Size")
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
// write "MTime"
|
|
|
|
err = en.Append(0xa5, 0x4d, 0x54, 0x69, 0x6d, 0x65)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2020-07-04 15:25:53 -04:00
|
|
|
err = en.WriteInt64(z.ModTime)
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
2020-07-04 15:25:53 -04:00
|
|
|
err = msgp.WrapError(err, "ModTime")
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
// write "MetaSys"
|
|
|
|
err = en.Append(0xa7, 0x4d, 0x65, 0x74, 0x61, 0x53, 0x79, 0x73)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.MetaSys == nil { // allownil: if nil
|
|
|
|
err = en.WriteNil()
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
} else {
|
2020-06-12 23:04:01 -04:00
|
|
|
err = en.WriteMapHeader(uint32(len(z.MetaSys)))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaSys")
|
|
|
|
return
|
|
|
|
}
|
2022-07-11 20:30:56 -04:00
|
|
|
for za0009, za0010 := range z.MetaSys {
|
|
|
|
err = en.WriteString(za0009)
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaSys")
|
|
|
|
return
|
|
|
|
}
|
2022-07-11 20:30:56 -04:00
|
|
|
err = en.WriteBytes(za0010)
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
2022-07-11 20:30:56 -04:00
|
|
|
err = msgp.WrapError(err, "MetaSys", za0009)
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
// write "MetaUsr"
|
|
|
|
err = en.Append(0xa7, 0x4d, 0x65, 0x74, 0x61, 0x55, 0x73, 0x72)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.MetaUser == nil { // allownil: if nil
|
|
|
|
err = en.WriteNil()
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
} else {
|
2020-06-12 23:04:01 -04:00
|
|
|
err = en.WriteMapHeader(uint32(len(z.MetaUser)))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaUser")
|
|
|
|
return
|
|
|
|
}
|
2022-07-11 20:30:56 -04:00
|
|
|
for za0011, za0012 := range z.MetaUser {
|
|
|
|
err = en.WriteString(za0011)
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaUser")
|
|
|
|
return
|
|
|
|
}
|
2022-07-11 20:30:56 -04:00
|
|
|
err = en.WriteString(za0012)
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
2022-07-11 20:30:56 -04:00
|
|
|
err = msgp.WrapError(err, "MetaUser", za0011)
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z *xlMetaV2Object) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
2024-03-21 13:21:35 -04:00
|
|
|
// check for omitted fields
|
2022-07-11 20:30:56 -04:00
|
|
|
zb0001Len := uint32(18)
|
|
|
|
var zb0001Mask uint32 /* 18 bits */
|
2022-08-31 15:28:03 -04:00
|
|
|
_ = zb0001Mask
|
2022-07-11 20:30:56 -04:00
|
|
|
if z.PartIndices == nil {
|
|
|
|
zb0001Len--
|
|
|
|
zb0001Mask |= 0x2000
|
|
|
|
}
|
|
|
|
// variable map header, size zb0001Len
|
|
|
|
o = msgp.AppendMapHeader(o, zb0001Len)
|
|
|
|
if zb0001Len == 0 {
|
|
|
|
return
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
// string "ID"
|
2022-07-11 20:30:56 -04:00
|
|
|
o = append(o, 0xa2, 0x49, 0x44)
|
2020-06-12 23:04:01 -04:00
|
|
|
o = msgp.AppendBytes(o, (z.VersionID)[:])
|
|
|
|
// string "DDir"
|
|
|
|
o = append(o, 0xa4, 0x44, 0x44, 0x69, 0x72)
|
|
|
|
o = msgp.AppendBytes(o, (z.DataDir)[:])
|
|
|
|
// string "EcAlgo"
|
|
|
|
o = append(o, 0xa6, 0x45, 0x63, 0x41, 0x6c, 0x67, 0x6f)
|
|
|
|
o = msgp.AppendUint8(o, uint8(z.ErasureAlgorithm))
|
|
|
|
// string "EcM"
|
|
|
|
o = append(o, 0xa3, 0x45, 0x63, 0x4d)
|
|
|
|
o = msgp.AppendInt(o, z.ErasureM)
|
|
|
|
// string "EcN"
|
|
|
|
o = append(o, 0xa3, 0x45, 0x63, 0x4e)
|
|
|
|
o = msgp.AppendInt(o, z.ErasureN)
|
|
|
|
// string "EcBSize"
|
|
|
|
o = append(o, 0xa7, 0x45, 0x63, 0x42, 0x53, 0x69, 0x7a, 0x65)
|
|
|
|
o = msgp.AppendInt64(o, z.ErasureBlockSize)
|
|
|
|
// string "EcIndex"
|
|
|
|
o = append(o, 0xa7, 0x45, 0x63, 0x49, 0x6e, 0x64, 0x65, 0x78)
|
|
|
|
o = msgp.AppendInt(o, z.ErasureIndex)
|
|
|
|
// string "EcDist"
|
|
|
|
o = append(o, 0xa6, 0x45, 0x63, 0x44, 0x69, 0x73, 0x74)
|
|
|
|
o = msgp.AppendArrayHeader(o, uint32(len(z.ErasureDist)))
|
|
|
|
for za0003 := range z.ErasureDist {
|
|
|
|
o = msgp.AppendUint8(o, z.ErasureDist[za0003])
|
|
|
|
}
|
|
|
|
// string "CSumAlgo"
|
|
|
|
o = append(o, 0xa8, 0x43, 0x53, 0x75, 0x6d, 0x41, 0x6c, 0x67, 0x6f)
|
|
|
|
o = msgp.AppendUint8(o, uint8(z.BitrotChecksumAlgo))
|
|
|
|
// string "PartNums"
|
|
|
|
o = append(o, 0xa8, 0x50, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x73)
|
|
|
|
o = msgp.AppendArrayHeader(o, uint32(len(z.PartNumbers)))
|
|
|
|
for za0004 := range z.PartNumbers {
|
|
|
|
o = msgp.AppendInt(o, z.PartNumbers[za0004])
|
|
|
|
}
|
|
|
|
// string "PartETags"
|
|
|
|
o = append(o, 0xa9, 0x50, 0x61, 0x72, 0x74, 0x45, 0x54, 0x61, 0x67, 0x73)
|
2021-11-18 15:15:22 -05:00
|
|
|
if z.PartETags == nil { // allownil: if nil
|
|
|
|
o = msgp.AppendNil(o)
|
|
|
|
} else {
|
|
|
|
o = msgp.AppendArrayHeader(o, uint32(len(z.PartETags)))
|
|
|
|
for za0005 := range z.PartETags {
|
|
|
|
o = msgp.AppendString(o, z.PartETags[za0005])
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
|
|
|
// string "PartSizes"
|
|
|
|
o = append(o, 0xa9, 0x50, 0x61, 0x72, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x73)
|
|
|
|
o = msgp.AppendArrayHeader(o, uint32(len(z.PartSizes)))
|
|
|
|
for za0006 := range z.PartSizes {
|
|
|
|
o = msgp.AppendInt64(o, z.PartSizes[za0006])
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
// string "PartASizes"
|
|
|
|
o = append(o, 0xaa, 0x50, 0x61, 0x72, 0x74, 0x41, 0x53, 0x69, 0x7a, 0x65, 0x73)
|
|
|
|
if z.PartActualSizes == nil { // allownil: if nil
|
|
|
|
o = msgp.AppendNil(o)
|
|
|
|
} else {
|
2020-06-12 23:04:01 -04:00
|
|
|
o = msgp.AppendArrayHeader(o, uint32(len(z.PartActualSizes)))
|
|
|
|
for za0007 := range z.PartActualSizes {
|
|
|
|
o = msgp.AppendInt64(o, z.PartActualSizes[za0007])
|
|
|
|
}
|
|
|
|
}
|
2024-03-21 13:21:35 -04:00
|
|
|
if (zb0001Mask & 0x2000) == 0 { // if not omitted
|
2022-07-11 20:30:56 -04:00
|
|
|
// string "PartIdx"
|
|
|
|
o = append(o, 0xa7, 0x50, 0x61, 0x72, 0x74, 0x49, 0x64, 0x78)
|
|
|
|
o = msgp.AppendArrayHeader(o, uint32(len(z.PartIndices)))
|
|
|
|
for za0008 := range z.PartIndices {
|
|
|
|
o = msgp.AppendBytes(o, z.PartIndices[za0008])
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
// string "Size"
|
|
|
|
o = append(o, 0xa4, 0x53, 0x69, 0x7a, 0x65)
|
2020-07-04 15:25:53 -04:00
|
|
|
o = msgp.AppendInt64(o, z.Size)
|
2020-06-12 23:04:01 -04:00
|
|
|
// string "MTime"
|
|
|
|
o = append(o, 0xa5, 0x4d, 0x54, 0x69, 0x6d, 0x65)
|
2020-07-04 15:25:53 -04:00
|
|
|
o = msgp.AppendInt64(o, z.ModTime)
|
2021-11-18 15:15:22 -05:00
|
|
|
// string "MetaSys"
|
|
|
|
o = append(o, 0xa7, 0x4d, 0x65, 0x74, 0x61, 0x53, 0x79, 0x73)
|
|
|
|
if z.MetaSys == nil { // allownil: if nil
|
|
|
|
o = msgp.AppendNil(o)
|
|
|
|
} else {
|
2020-06-12 23:04:01 -04:00
|
|
|
o = msgp.AppendMapHeader(o, uint32(len(z.MetaSys)))
|
2022-07-11 20:30:56 -04:00
|
|
|
for za0009, za0010 := range z.MetaSys {
|
|
|
|
o = msgp.AppendString(o, za0009)
|
|
|
|
o = msgp.AppendBytes(o, za0010)
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
// string "MetaUsr"
|
|
|
|
o = append(o, 0xa7, 0x4d, 0x65, 0x74, 0x61, 0x55, 0x73, 0x72)
|
|
|
|
if z.MetaUser == nil { // allownil: if nil
|
|
|
|
o = msgp.AppendNil(o)
|
|
|
|
} else {
|
2020-06-12 23:04:01 -04:00
|
|
|
o = msgp.AppendMapHeader(o, uint32(len(z.MetaUser)))
|
2022-07-11 20:30:56 -04:00
|
|
|
for za0011, za0012 := range z.MetaUser {
|
2020-06-12 23:04:01 -04:00
|
|
|
o = msgp.AppendString(o, za0011)
|
2022-07-11 20:30:56 -04:00
|
|
|
o = msgp.AppendString(o, za0012)
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *xlMetaV2Object) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
var zb0001Mask uint8 /* 1 bits */
|
|
|
|
_ = zb0001Mask
|
2020-06-12 23:04:01 -04:00
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "ID":
|
|
|
|
bts, err = msgp.ReadExactBytes(bts, (z.VersionID)[:])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "VersionID")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "DDir":
|
|
|
|
bts, err = msgp.ReadExactBytes(bts, (z.DataDir)[:])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "DataDir")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "EcAlgo":
|
|
|
|
{
|
|
|
|
var zb0002 uint8
|
|
|
|
zb0002, bts, err = msgp.ReadUint8Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureAlgorithm")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ErasureAlgorithm = ErasureAlgo(zb0002)
|
|
|
|
}
|
|
|
|
case "EcM":
|
|
|
|
z.ErasureM, bts, err = msgp.ReadIntBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureM")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "EcN":
|
|
|
|
z.ErasureN, bts, err = msgp.ReadIntBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureN")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "EcBSize":
|
|
|
|
z.ErasureBlockSize, bts, err = msgp.ReadInt64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureBlockSize")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "EcIndex":
|
|
|
|
z.ErasureIndex, bts, err = msgp.ReadIntBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureIndex")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
case "EcDist":
|
|
|
|
var zb0003 uint32
|
|
|
|
zb0003, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureDist")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if cap(z.ErasureDist) >= int(zb0003) {
|
|
|
|
z.ErasureDist = (z.ErasureDist)[:zb0003]
|
|
|
|
} else {
|
|
|
|
z.ErasureDist = make([]uint8, zb0003)
|
|
|
|
}
|
|
|
|
for za0003 := range z.ErasureDist {
|
|
|
|
z.ErasureDist[za0003], bts, err = msgp.ReadUint8Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ErasureDist", za0003)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "CSumAlgo":
|
|
|
|
{
|
|
|
|
var zb0004 uint8
|
|
|
|
zb0004, bts, err = msgp.ReadUint8Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "BitrotChecksumAlgo")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.BitrotChecksumAlgo = ChecksumAlgo(zb0004)
|
|
|
|
}
|
|
|
|
case "PartNums":
|
|
|
|
var zb0005 uint32
|
|
|
|
zb0005, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartNumbers")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if cap(z.PartNumbers) >= int(zb0005) {
|
|
|
|
z.PartNumbers = (z.PartNumbers)[:zb0005]
|
|
|
|
} else {
|
|
|
|
z.PartNumbers = make([]int, zb0005)
|
|
|
|
}
|
|
|
|
for za0004 := range z.PartNumbers {
|
|
|
|
z.PartNumbers[za0004], bts, err = msgp.ReadIntBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartNumbers", za0004)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "PartETags":
|
2021-11-18 15:15:22 -05:00
|
|
|
if msgp.IsNil(bts) {
|
|
|
|
bts = bts[1:]
|
|
|
|
z.PartETags = nil
|
2020-06-12 23:04:01 -04:00
|
|
|
} else {
|
2021-11-18 15:15:22 -05:00
|
|
|
var zb0006 uint32
|
|
|
|
zb0006, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
2021-11-18 15:15:22 -05:00
|
|
|
err = msgp.WrapError(err, "PartETags")
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
2024-03-21 13:21:35 -04:00
|
|
|
if z.PartETags != nil && cap(z.PartETags) >= int(zb0006) {
|
2021-11-18 15:15:22 -05:00
|
|
|
z.PartETags = (z.PartETags)[:zb0006]
|
|
|
|
} else {
|
|
|
|
z.PartETags = make([]string, zb0006)
|
|
|
|
}
|
|
|
|
for za0005 := range z.PartETags {
|
|
|
|
z.PartETags[za0005], bts, err = msgp.ReadStringBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartETags", za0005)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
|
|
|
case "PartSizes":
|
|
|
|
var zb0007 uint32
|
|
|
|
zb0007, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartSizes")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if cap(z.PartSizes) >= int(zb0007) {
|
|
|
|
z.PartSizes = (z.PartSizes)[:zb0007]
|
|
|
|
} else {
|
|
|
|
z.PartSizes = make([]int64, zb0007)
|
|
|
|
}
|
|
|
|
for za0006 := range z.PartSizes {
|
|
|
|
z.PartSizes[za0006], bts, err = msgp.ReadInt64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartSizes", za0006)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case "PartASizes":
|
2021-11-18 15:15:22 -05:00
|
|
|
if msgp.IsNil(bts) {
|
|
|
|
bts = bts[1:]
|
|
|
|
z.PartActualSizes = nil
|
2020-06-12 23:04:01 -04:00
|
|
|
} else {
|
2021-11-18 15:15:22 -05:00
|
|
|
var zb0008 uint32
|
|
|
|
zb0008, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
2021-11-18 15:15:22 -05:00
|
|
|
err = msgp.WrapError(err, "PartActualSizes")
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
2024-03-21 13:21:35 -04:00
|
|
|
if z.PartActualSizes != nil && cap(z.PartActualSizes) >= int(zb0008) {
|
2021-11-18 15:15:22 -05:00
|
|
|
z.PartActualSizes = (z.PartActualSizes)[:zb0008]
|
|
|
|
} else {
|
|
|
|
z.PartActualSizes = make([]int64, zb0008)
|
|
|
|
}
|
|
|
|
for za0007 := range z.PartActualSizes {
|
|
|
|
z.PartActualSizes[za0007], bts, err = msgp.ReadInt64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartActualSizes", za0007)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
2022-07-11 20:30:56 -04:00
|
|
|
case "PartIdx":
|
|
|
|
var zb0009 uint32
|
|
|
|
zb0009, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartIndices")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if cap(z.PartIndices) >= int(zb0009) {
|
|
|
|
z.PartIndices = (z.PartIndices)[:zb0009]
|
|
|
|
} else {
|
|
|
|
z.PartIndices = make([][]byte, zb0009)
|
|
|
|
}
|
|
|
|
for za0008 := range z.PartIndices {
|
|
|
|
z.PartIndices[za0008], bts, err = msgp.ReadBytesBytes(bts, z.PartIndices[za0008])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "PartIndices", za0008)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
zb0001Mask |= 0x1
|
2020-06-12 23:04:01 -04:00
|
|
|
case "Size":
|
2020-07-04 15:25:53 -04:00
|
|
|
z.Size, bts, err = msgp.ReadInt64Bytes(bts)
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
2020-07-04 15:25:53 -04:00
|
|
|
err = msgp.WrapError(err, "Size")
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
case "MTime":
|
2020-07-04 15:25:53 -04:00
|
|
|
z.ModTime, bts, err = msgp.ReadInt64Bytes(bts)
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
2020-07-04 15:25:53 -04:00
|
|
|
err = msgp.WrapError(err, "ModTime")
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
case "MetaSys":
|
2021-11-18 15:15:22 -05:00
|
|
|
if msgp.IsNil(bts) {
|
|
|
|
bts = bts[1:]
|
|
|
|
z.MetaSys = nil
|
|
|
|
} else {
|
2022-07-11 20:30:56 -04:00
|
|
|
var zb0010 uint32
|
|
|
|
zb0010, bts, err = msgp.ReadMapHeaderBytes(bts)
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaSys")
|
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
if z.MetaSys == nil {
|
2022-07-11 20:30:56 -04:00
|
|
|
z.MetaSys = make(map[string][]byte, zb0010)
|
2021-11-18 15:15:22 -05:00
|
|
|
} else if len(z.MetaSys) > 0 {
|
|
|
|
for key := range z.MetaSys {
|
|
|
|
delete(z.MetaSys, key)
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
2022-07-11 20:30:56 -04:00
|
|
|
for zb0010 > 0 {
|
|
|
|
var za0009 string
|
|
|
|
var za0010 []byte
|
|
|
|
zb0010--
|
|
|
|
za0009, bts, err = msgp.ReadStringBytes(bts)
|
2021-11-18 15:15:22 -05:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaSys")
|
|
|
|
return
|
|
|
|
}
|
2022-07-11 20:30:56 -04:00
|
|
|
za0010, bts, err = msgp.ReadBytesBytes(bts, za0010)
|
2021-11-18 15:15:22 -05:00
|
|
|
if err != nil {
|
2022-07-11 20:30:56 -04:00
|
|
|
err = msgp.WrapError(err, "MetaSys", za0009)
|
2021-11-18 15:15:22 -05:00
|
|
|
return
|
|
|
|
}
|
2022-07-11 20:30:56 -04:00
|
|
|
z.MetaSys[za0009] = za0010
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
case "MetaUsr":
|
|
|
|
if msgp.IsNil(bts) {
|
|
|
|
bts = bts[1:]
|
|
|
|
z.MetaUser = nil
|
|
|
|
} else {
|
2022-07-11 20:30:56 -04:00
|
|
|
var zb0011 uint32
|
|
|
|
zb0011, bts, err = msgp.ReadMapHeaderBytes(bts)
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaUser")
|
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
if z.MetaUser == nil {
|
2022-07-11 20:30:56 -04:00
|
|
|
z.MetaUser = make(map[string]string, zb0011)
|
2021-11-18 15:15:22 -05:00
|
|
|
} else if len(z.MetaUser) > 0 {
|
|
|
|
for key := range z.MetaUser {
|
|
|
|
delete(z.MetaUser, key)
|
|
|
|
}
|
|
|
|
}
|
2022-07-11 20:30:56 -04:00
|
|
|
for zb0011 > 0 {
|
2021-11-18 15:15:22 -05:00
|
|
|
var za0011 string
|
2022-07-11 20:30:56 -04:00
|
|
|
var za0012 string
|
|
|
|
zb0011--
|
|
|
|
za0011, bts, err = msgp.ReadStringBytes(bts)
|
2021-11-18 15:15:22 -05:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "MetaUser")
|
|
|
|
return
|
|
|
|
}
|
2022-07-11 20:30:56 -04:00
|
|
|
za0012, bts, err = msgp.ReadStringBytes(bts)
|
2021-11-18 15:15:22 -05:00
|
|
|
if err != nil {
|
2022-07-11 20:30:56 -04:00
|
|
|
err = msgp.WrapError(err, "MetaUser", za0011)
|
2021-11-18 15:15:22 -05:00
|
|
|
return
|
|
|
|
}
|
2022-07-11 20:30:56 -04:00
|
|
|
z.MetaUser[za0011] = za0012
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
// Clear omitted fields.
|
|
|
|
if zb0001Mask != 0x1 {
|
|
|
|
if (zb0001Mask & 0x1) == 0 {
|
|
|
|
z.PartIndices = nil
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *xlMetaV2Object) Msgsize() (s int) {
|
|
|
|
s = 3 + 3 + msgp.ArrayHeaderSize + (16 * (msgp.ByteSize)) + 5 + msgp.ArrayHeaderSize + (16 * (msgp.ByteSize)) + 7 + msgp.Uint8Size + 4 + msgp.IntSize + 4 + msgp.IntSize + 8 + msgp.Int64Size + 8 + msgp.IntSize + 7 + msgp.ArrayHeaderSize + (len(z.ErasureDist) * (msgp.Uint8Size)) + 9 + msgp.Uint8Size + 9 + msgp.ArrayHeaderSize + (len(z.PartNumbers) * (msgp.IntSize)) + 10 + msgp.ArrayHeaderSize
|
|
|
|
for za0005 := range z.PartETags {
|
|
|
|
s += msgp.StringPrefixSize + len(z.PartETags[za0005])
|
|
|
|
}
|
2022-07-11 20:30:56 -04:00
|
|
|
s += 10 + msgp.ArrayHeaderSize + (len(z.PartSizes) * (msgp.Int64Size)) + 11 + msgp.ArrayHeaderSize + (len(z.PartActualSizes) * (msgp.Int64Size)) + 8 + msgp.ArrayHeaderSize
|
|
|
|
for za0008 := range z.PartIndices {
|
|
|
|
s += msgp.BytesPrefixSize + len(z.PartIndices[za0008])
|
|
|
|
}
|
|
|
|
s += 5 + msgp.Int64Size + 6 + msgp.Int64Size + 8 + msgp.MapHeaderSize
|
2020-06-12 23:04:01 -04:00
|
|
|
if z.MetaSys != nil {
|
2022-07-11 20:30:56 -04:00
|
|
|
for za0009, za0010 := range z.MetaSys {
|
|
|
|
_ = za0010
|
|
|
|
s += msgp.StringPrefixSize + len(za0009) + msgp.BytesPrefixSize + len(za0010)
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
s += 8 + msgp.MapHeaderSize
|
|
|
|
if z.MetaUser != nil {
|
2022-07-11 20:30:56 -04:00
|
|
|
for za0011, za0012 := range z.MetaUser {
|
|
|
|
_ = za0012
|
|
|
|
s += msgp.StringPrefixSize + len(za0011) + msgp.StringPrefixSize + len(za0012)
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *xlMetaV2Version) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadMapHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
var zb0001Mask uint8 /* 3 bits */
|
|
|
|
_ = zb0001Mask
|
2020-06-12 23:04:01 -04:00
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, err = dc.ReadMapKeyPtr()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "Type":
|
|
|
|
{
|
|
|
|
var zb0002 uint8
|
|
|
|
zb0002, err = dc.ReadUint8()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Type")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Type = VersionType(zb0002)
|
|
|
|
}
|
|
|
|
case "V1Obj":
|
|
|
|
if dc.IsNil() {
|
|
|
|
err = dc.ReadNil()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjectV1")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ObjectV1 = nil
|
|
|
|
} else {
|
|
|
|
if z.ObjectV1 == nil {
|
|
|
|
z.ObjectV1 = new(xlMetaV1Object)
|
|
|
|
}
|
|
|
|
err = z.ObjectV1.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjectV1")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
zb0001Mask |= 0x1
|
2020-06-12 23:04:01 -04:00
|
|
|
case "V2Obj":
|
|
|
|
if dc.IsNil() {
|
|
|
|
err = dc.ReadNil()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjectV2")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ObjectV2 = nil
|
|
|
|
} else {
|
|
|
|
if z.ObjectV2 == nil {
|
|
|
|
z.ObjectV2 = new(xlMetaV2Object)
|
|
|
|
}
|
|
|
|
err = z.ObjectV2.DecodeMsg(dc)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjectV2")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
zb0001Mask |= 0x2
|
2020-06-12 23:04:01 -04:00
|
|
|
case "DelObj":
|
|
|
|
if dc.IsNil() {
|
|
|
|
err = dc.ReadNil()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "DeleteMarker")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.DeleteMarker = nil
|
|
|
|
} else {
|
|
|
|
if z.DeleteMarker == nil {
|
|
|
|
z.DeleteMarker = new(xlMetaV2DeleteMarker)
|
|
|
|
}
|
2020-11-19 21:43:58 -05:00
|
|
|
err = z.DeleteMarker.DecodeMsg(dc)
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "DeleteMarker")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
zb0001Mask |= 0x4
|
2022-06-27 06:59:41 -04:00
|
|
|
case "v":
|
|
|
|
z.WrittenByVersion, err = dc.ReadUint64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "WrittenByVersion")
|
|
|
|
return
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
default:
|
|
|
|
err = dc.Skip()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
// Clear omitted fields.
|
|
|
|
if zb0001Mask != 0x7 {
|
|
|
|
if (zb0001Mask & 0x1) == 0 {
|
|
|
|
z.ObjectV1 = nil
|
|
|
|
}
|
|
|
|
if (zb0001Mask & 0x2) == 0 {
|
|
|
|
z.ObjectV2 = nil
|
|
|
|
}
|
|
|
|
if (zb0001Mask & 0x4) == 0 {
|
|
|
|
z.DeleteMarker = nil
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z *xlMetaV2Version) EncodeMsg(en *msgp.Writer) (err error) {
|
2024-03-21 13:21:35 -04:00
|
|
|
// check for omitted fields
|
2022-06-27 06:59:41 -04:00
|
|
|
zb0001Len := uint32(5)
|
|
|
|
var zb0001Mask uint8 /* 5 bits */
|
2022-08-31 15:28:03 -04:00
|
|
|
_ = zb0001Mask
|
2020-06-12 23:04:01 -04:00
|
|
|
if z.ObjectV1 == nil {
|
|
|
|
zb0001Len--
|
|
|
|
zb0001Mask |= 0x2
|
|
|
|
}
|
|
|
|
if z.ObjectV2 == nil {
|
|
|
|
zb0001Len--
|
|
|
|
zb0001Mask |= 0x4
|
|
|
|
}
|
|
|
|
if z.DeleteMarker == nil {
|
|
|
|
zb0001Len--
|
|
|
|
zb0001Mask |= 0x8
|
|
|
|
}
|
|
|
|
// variable map header, size zb0001Len
|
|
|
|
err = en.Append(0x80 | uint8(zb0001Len))
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if zb0001Len == 0 {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// write "Type"
|
|
|
|
err = en.Append(0xa4, 0x54, 0x79, 0x70, 0x65)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint8(uint8(z.Type))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Type")
|
|
|
|
return
|
|
|
|
}
|
2024-03-21 13:21:35 -04:00
|
|
|
if (zb0001Mask & 0x2) == 0 { // if not omitted
|
2020-06-12 23:04:01 -04:00
|
|
|
// write "V1Obj"
|
|
|
|
err = en.Append(0xa5, 0x56, 0x31, 0x4f, 0x62, 0x6a)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.ObjectV1 == nil {
|
|
|
|
err = en.WriteNil()
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
err = z.ObjectV1.EncodeMsg(en)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjectV1")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-03-21 13:21:35 -04:00
|
|
|
if (zb0001Mask & 0x4) == 0 { // if not omitted
|
2020-06-12 23:04:01 -04:00
|
|
|
// write "V2Obj"
|
|
|
|
err = en.Append(0xa5, 0x56, 0x32, 0x4f, 0x62, 0x6a)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.ObjectV2 == nil {
|
|
|
|
err = en.WriteNil()
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
err = z.ObjectV2.EncodeMsg(en)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjectV2")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-03-21 13:21:35 -04:00
|
|
|
if (zb0001Mask & 0x8) == 0 { // if not omitted
|
2020-06-12 23:04:01 -04:00
|
|
|
// write "DelObj"
|
|
|
|
err = en.Append(0xa6, 0x44, 0x65, 0x6c, 0x4f, 0x62, 0x6a)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if z.DeleteMarker == nil {
|
|
|
|
err = en.WriteNil()
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
} else {
|
2020-11-19 21:43:58 -05:00
|
|
|
err = z.DeleteMarker.EncodeMsg(en)
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
2020-11-19 21:43:58 -05:00
|
|
|
err = msgp.WrapError(err, "DeleteMarker")
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-06-27 06:59:41 -04:00
|
|
|
// write "v"
|
|
|
|
err = en.Append(0xa1, 0x76)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint64(z.WrittenByVersion)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "WrittenByVersion")
|
|
|
|
return
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z *xlMetaV2Version) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
2024-03-21 13:21:35 -04:00
|
|
|
// check for omitted fields
|
2022-06-27 06:59:41 -04:00
|
|
|
zb0001Len := uint32(5)
|
|
|
|
var zb0001Mask uint8 /* 5 bits */
|
2022-08-31 15:28:03 -04:00
|
|
|
_ = zb0001Mask
|
2020-06-12 23:04:01 -04:00
|
|
|
if z.ObjectV1 == nil {
|
|
|
|
zb0001Len--
|
|
|
|
zb0001Mask |= 0x2
|
|
|
|
}
|
|
|
|
if z.ObjectV2 == nil {
|
|
|
|
zb0001Len--
|
|
|
|
zb0001Mask |= 0x4
|
|
|
|
}
|
|
|
|
if z.DeleteMarker == nil {
|
|
|
|
zb0001Len--
|
|
|
|
zb0001Mask |= 0x8
|
|
|
|
}
|
|
|
|
// variable map header, size zb0001Len
|
|
|
|
o = append(o, 0x80|uint8(zb0001Len))
|
|
|
|
if zb0001Len == 0 {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
// string "Type"
|
|
|
|
o = append(o, 0xa4, 0x54, 0x79, 0x70, 0x65)
|
|
|
|
o = msgp.AppendUint8(o, uint8(z.Type))
|
2024-03-21 13:21:35 -04:00
|
|
|
if (zb0001Mask & 0x2) == 0 { // if not omitted
|
2020-06-12 23:04:01 -04:00
|
|
|
// string "V1Obj"
|
|
|
|
o = append(o, 0xa5, 0x56, 0x31, 0x4f, 0x62, 0x6a)
|
|
|
|
if z.ObjectV1 == nil {
|
|
|
|
o = msgp.AppendNil(o)
|
|
|
|
} else {
|
|
|
|
o, err = z.ObjectV1.MarshalMsg(o)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjectV1")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-03-21 13:21:35 -04:00
|
|
|
if (zb0001Mask & 0x4) == 0 { // if not omitted
|
2020-06-12 23:04:01 -04:00
|
|
|
// string "V2Obj"
|
|
|
|
o = append(o, 0xa5, 0x56, 0x32, 0x4f, 0x62, 0x6a)
|
|
|
|
if z.ObjectV2 == nil {
|
|
|
|
o = msgp.AppendNil(o)
|
|
|
|
} else {
|
|
|
|
o, err = z.ObjectV2.MarshalMsg(o)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjectV2")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-03-21 13:21:35 -04:00
|
|
|
if (zb0001Mask & 0x8) == 0 { // if not omitted
|
2020-06-12 23:04:01 -04:00
|
|
|
// string "DelObj"
|
|
|
|
o = append(o, 0xa6, 0x44, 0x65, 0x6c, 0x4f, 0x62, 0x6a)
|
|
|
|
if z.DeleteMarker == nil {
|
|
|
|
o = msgp.AppendNil(o)
|
|
|
|
} else {
|
2020-11-19 21:43:58 -05:00
|
|
|
o, err = z.DeleteMarker.MarshalMsg(o)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "DeleteMarker")
|
|
|
|
return
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
|
|
|
}
|
2022-06-27 06:59:41 -04:00
|
|
|
// string "v"
|
|
|
|
o = append(o, 0xa1, 0x76)
|
|
|
|
o = msgp.AppendUint64(o, z.WrittenByVersion)
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *xlMetaV2Version) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var field []byte
|
|
|
|
_ = field
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
var zb0001Mask uint8 /* 3 bits */
|
|
|
|
_ = zb0001Mask
|
2020-06-12 23:04:01 -04:00
|
|
|
for zb0001 > 0 {
|
|
|
|
zb0001--
|
|
|
|
field, bts, err = msgp.ReadMapKeyZC(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
switch msgp.UnsafeString(field) {
|
|
|
|
case "Type":
|
|
|
|
{
|
|
|
|
var zb0002 uint8
|
|
|
|
zb0002, bts, err = msgp.ReadUint8Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Type")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Type = VersionType(zb0002)
|
|
|
|
}
|
|
|
|
case "V1Obj":
|
|
|
|
if msgp.IsNil(bts) {
|
|
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ObjectV1 = nil
|
|
|
|
} else {
|
|
|
|
if z.ObjectV1 == nil {
|
|
|
|
z.ObjectV1 = new(xlMetaV1Object)
|
|
|
|
}
|
|
|
|
bts, err = z.ObjectV1.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjectV1")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
zb0001Mask |= 0x1
|
2020-06-12 23:04:01 -04:00
|
|
|
case "V2Obj":
|
|
|
|
if msgp.IsNil(bts) {
|
|
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ObjectV2 = nil
|
|
|
|
} else {
|
|
|
|
if z.ObjectV2 == nil {
|
|
|
|
z.ObjectV2 = new(xlMetaV2Object)
|
|
|
|
}
|
|
|
|
bts, err = z.ObjectV2.UnmarshalMsg(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ObjectV2")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
zb0001Mask |= 0x2
|
2020-06-12 23:04:01 -04:00
|
|
|
case "DelObj":
|
|
|
|
if msgp.IsNil(bts) {
|
|
|
|
bts, err = msgp.ReadNilBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.DeleteMarker = nil
|
|
|
|
} else {
|
|
|
|
if z.DeleteMarker == nil {
|
|
|
|
z.DeleteMarker = new(xlMetaV2DeleteMarker)
|
|
|
|
}
|
2020-11-19 21:43:58 -05:00
|
|
|
bts, err = z.DeleteMarker.UnmarshalMsg(bts)
|
2020-06-12 23:04:01 -04:00
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "DeleteMarker")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
zb0001Mask |= 0x4
|
2022-06-27 06:59:41 -04:00
|
|
|
case "v":
|
|
|
|
z.WrittenByVersion, bts, err = msgp.ReadUint64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "WrittenByVersion")
|
|
|
|
return
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
default:
|
|
|
|
bts, err = msgp.Skip(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-10-22 11:30:50 -04:00
|
|
|
// Clear omitted fields.
|
|
|
|
if zb0001Mask != 0x7 {
|
|
|
|
if (zb0001Mask & 0x1) == 0 {
|
|
|
|
z.ObjectV1 = nil
|
|
|
|
}
|
|
|
|
if (zb0001Mask & 0x2) == 0 {
|
|
|
|
z.ObjectV2 = nil
|
|
|
|
}
|
|
|
|
if (zb0001Mask & 0x4) == 0 {
|
|
|
|
z.DeleteMarker = nil
|
|
|
|
}
|
|
|
|
}
|
2020-06-12 23:04:01 -04:00
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *xlMetaV2Version) Msgsize() (s int) {
|
|
|
|
s = 1 + 5 + msgp.Uint8Size + 6
|
|
|
|
if z.ObjectV1 == nil {
|
|
|
|
s += msgp.NilSize
|
|
|
|
} else {
|
|
|
|
s += z.ObjectV1.Msgsize()
|
|
|
|
}
|
|
|
|
s += 6
|
|
|
|
if z.ObjectV2 == nil {
|
|
|
|
s += msgp.NilSize
|
|
|
|
} else {
|
|
|
|
s += z.ObjectV2.Msgsize()
|
|
|
|
}
|
|
|
|
s += 7
|
|
|
|
if z.DeleteMarker == nil {
|
|
|
|
s += msgp.NilSize
|
|
|
|
} else {
|
2020-11-19 21:43:58 -05:00
|
|
|
s += z.DeleteMarker.Msgsize()
|
2020-06-12 23:04:01 -04:00
|
|
|
}
|
2022-06-27 06:59:41 -04:00
|
|
|
s += 2 + msgp.Uint64Size
|
2020-06-12 23:04:01 -04:00
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
|
|
|
|
// DecodeMsg implements msgp.Decodable
|
|
|
|
func (z *xlMetaV2VersionHeader) DecodeMsg(dc *msgp.Reader) (err error) {
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, err = dc.ReadArrayHeader()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2024-04-19 12:43:43 -04:00
|
|
|
if zb0001 != 7 {
|
|
|
|
err = msgp.ArrayError{Wanted: 7, Got: zb0001}
|
2021-11-18 15:15:22 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
err = dc.ReadExactBytes((z.VersionID)[:])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "VersionID")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ModTime, err = dc.ReadInt64()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ModTime")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = dc.ReadExactBytes((z.Signature)[:])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Signature")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
{
|
|
|
|
var zb0002 uint8
|
|
|
|
zb0002, err = dc.ReadUint8()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Type")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Type = VersionType(zb0002)
|
|
|
|
}
|
|
|
|
{
|
|
|
|
var zb0003 uint8
|
|
|
|
zb0003, err = dc.ReadUint8()
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Flags")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Flags = xlFlags(zb0003)
|
|
|
|
}
|
2024-05-29 15:14:09 -04:00
|
|
|
z.EcN, err = dc.ReadUint8()
|
2024-04-19 12:43:43 -04:00
|
|
|
if err != nil {
|
2024-05-29 15:14:09 -04:00
|
|
|
err = msgp.WrapError(err, "EcN")
|
2024-04-19 12:43:43 -04:00
|
|
|
return
|
|
|
|
}
|
2024-05-29 15:14:09 -04:00
|
|
|
z.EcM, err = dc.ReadUint8()
|
2024-04-19 12:43:43 -04:00
|
|
|
if err != nil {
|
2024-05-29 15:14:09 -04:00
|
|
|
err = msgp.WrapError(err, "EcM")
|
2024-04-19 12:43:43 -04:00
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// EncodeMsg implements msgp.Encodable
|
|
|
|
func (z *xlMetaV2VersionHeader) EncodeMsg(en *msgp.Writer) (err error) {
|
2024-04-19 12:43:43 -04:00
|
|
|
// array header, size 7
|
|
|
|
err = en.Append(0x97)
|
2021-11-18 15:15:22 -05:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteBytes((z.VersionID)[:])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "VersionID")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteInt64(z.ModTime)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ModTime")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteBytes((z.Signature)[:])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Signature")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint8(uint8(z.Type))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Type")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
err = en.WriteUint8(uint8(z.Flags))
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Flags")
|
|
|
|
return
|
|
|
|
}
|
2024-05-29 15:14:09 -04:00
|
|
|
err = en.WriteUint8(z.EcN)
|
2024-04-19 12:43:43 -04:00
|
|
|
if err != nil {
|
2024-05-29 15:14:09 -04:00
|
|
|
err = msgp.WrapError(err, "EcN")
|
2024-04-19 12:43:43 -04:00
|
|
|
return
|
|
|
|
}
|
2024-05-29 15:14:09 -04:00
|
|
|
err = en.WriteUint8(z.EcM)
|
2024-04-19 12:43:43 -04:00
|
|
|
if err != nil {
|
2024-05-29 15:14:09 -04:00
|
|
|
err = msgp.WrapError(err, "EcM")
|
2024-04-19 12:43:43 -04:00
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalMsg implements msgp.Marshaler
|
|
|
|
func (z *xlMetaV2VersionHeader) MarshalMsg(b []byte) (o []byte, err error) {
|
|
|
|
o = msgp.Require(b, z.Msgsize())
|
2024-04-19 12:43:43 -04:00
|
|
|
// array header, size 7
|
|
|
|
o = append(o, 0x97)
|
2021-11-18 15:15:22 -05:00
|
|
|
o = msgp.AppendBytes(o, (z.VersionID)[:])
|
|
|
|
o = msgp.AppendInt64(o, z.ModTime)
|
|
|
|
o = msgp.AppendBytes(o, (z.Signature)[:])
|
|
|
|
o = msgp.AppendUint8(o, uint8(z.Type))
|
|
|
|
o = msgp.AppendUint8(o, uint8(z.Flags))
|
2024-04-19 12:43:43 -04:00
|
|
|
o = msgp.AppendUint8(o, z.EcN)
|
2024-05-29 15:14:09 -04:00
|
|
|
o = msgp.AppendUint8(o, z.EcM)
|
2021-11-18 15:15:22 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalMsg implements msgp.Unmarshaler
|
|
|
|
func (z *xlMetaV2VersionHeader) UnmarshalMsg(bts []byte) (o []byte, err error) {
|
|
|
|
var zb0001 uint32
|
|
|
|
zb0001, bts, err = msgp.ReadArrayHeaderBytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err)
|
|
|
|
return
|
|
|
|
}
|
2024-04-19 12:43:43 -04:00
|
|
|
if zb0001 != 7 {
|
|
|
|
err = msgp.ArrayError{Wanted: 7, Got: zb0001}
|
2021-11-18 15:15:22 -05:00
|
|
|
return
|
|
|
|
}
|
|
|
|
bts, err = msgp.ReadExactBytes(bts, (z.VersionID)[:])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "VersionID")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.ModTime, bts, err = msgp.ReadInt64Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "ModTime")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
bts, err = msgp.ReadExactBytes(bts, (z.Signature)[:])
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Signature")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
{
|
|
|
|
var zb0002 uint8
|
|
|
|
zb0002, bts, err = msgp.ReadUint8Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Type")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Type = VersionType(zb0002)
|
|
|
|
}
|
|
|
|
{
|
|
|
|
var zb0003 uint8
|
|
|
|
zb0003, bts, err = msgp.ReadUint8Bytes(bts)
|
|
|
|
if err != nil {
|
|
|
|
err = msgp.WrapError(err, "Flags")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
z.Flags = xlFlags(zb0003)
|
|
|
|
}
|
2024-05-29 15:14:09 -04:00
|
|
|
z.EcN, bts, err = msgp.ReadUint8Bytes(bts)
|
2024-04-19 12:43:43 -04:00
|
|
|
if err != nil {
|
2024-05-29 15:14:09 -04:00
|
|
|
err = msgp.WrapError(err, "EcN")
|
2024-04-19 12:43:43 -04:00
|
|
|
return
|
|
|
|
}
|
2024-05-29 15:14:09 -04:00
|
|
|
z.EcM, bts, err = msgp.ReadUint8Bytes(bts)
|
2024-04-19 12:43:43 -04:00
|
|
|
if err != nil {
|
2024-05-29 15:14:09 -04:00
|
|
|
err = msgp.WrapError(err, "EcM")
|
2024-04-19 12:43:43 -04:00
|
|
|
return
|
|
|
|
}
|
2021-11-18 15:15:22 -05:00
|
|
|
o = bts
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
|
|
|
|
func (z *xlMetaV2VersionHeader) Msgsize() (s int) {
|
2024-04-19 12:43:43 -04:00
|
|
|
s = 1 + msgp.ArrayHeaderSize + (16 * (msgp.ByteSize)) + msgp.Int64Size + msgp.ArrayHeaderSize + (4 * (msgp.ByteSize)) + msgp.Uint8Size + msgp.Uint8Size + msgp.Uint8Size + msgp.Uint8Size
|
2021-11-18 15:15:22 -05:00
|
|
|
return
|
|
|
|
}
|