本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1119 lines
23KB

  1. package roaring
  2. // NOTE: THIS FILE WAS PRODUCED BY THE
  3. // MSGP CODE GENERATION TOOL (github.com/tinylib/msgp)
  4. // DO NOT EDIT
  5. import "github.com/tinylib/msgp/msgp"
  6. // DecodeMsg implements msgp.Decodable
  7. func (z *addHelper32) DecodeMsg(dc *msgp.Reader) (err error) {
  8. var field []byte
  9. _ = field
  10. var zbai uint32
  11. zbai, err = dc.ReadMapHeader()
  12. if err != nil {
  13. return
  14. }
  15. for zbai > 0 {
  16. zbai--
  17. field, err = dc.ReadMapKeyPtr()
  18. if err != nil {
  19. return
  20. }
  21. switch msgp.UnsafeString(field) {
  22. case "runstart":
  23. z.runstart, err = dc.ReadUint32()
  24. if err != nil {
  25. return
  26. }
  27. case "runlen":
  28. z.runlen, err = dc.ReadUint32()
  29. if err != nil {
  30. return
  31. }
  32. case "actuallyAdded":
  33. z.actuallyAdded, err = dc.ReadUint32()
  34. if err != nil {
  35. return
  36. }
  37. case "m":
  38. var zcmr uint32
  39. zcmr, err = dc.ReadArrayHeader()
  40. if err != nil {
  41. return
  42. }
  43. if cap(z.m) >= int(zcmr) {
  44. z.m = (z.m)[:zcmr]
  45. } else {
  46. z.m = make([]interval32, zcmr)
  47. }
  48. for zxvk := range z.m {
  49. var zajw uint32
  50. zajw, err = dc.ReadMapHeader()
  51. if err != nil {
  52. return
  53. }
  54. for zajw > 0 {
  55. zajw--
  56. field, err = dc.ReadMapKeyPtr()
  57. if err != nil {
  58. return
  59. }
  60. switch msgp.UnsafeString(field) {
  61. case "start":
  62. z.m[zxvk].start, err = dc.ReadUint32()
  63. if err != nil {
  64. return
  65. }
  66. case "last":
  67. z.m[zxvk].last, err = dc.ReadUint32()
  68. if err != nil {
  69. return
  70. }
  71. default:
  72. err = dc.Skip()
  73. if err != nil {
  74. return
  75. }
  76. }
  77. }
  78. }
  79. case "rc":
  80. if dc.IsNil() {
  81. err = dc.ReadNil()
  82. if err != nil {
  83. return
  84. }
  85. z.rc = nil
  86. } else {
  87. if z.rc == nil {
  88. z.rc = new(runContainer32)
  89. }
  90. var zwht uint32
  91. zwht, err = dc.ReadMapHeader()
  92. if err != nil {
  93. return
  94. }
  95. for zwht > 0 {
  96. zwht--
  97. field, err = dc.ReadMapKeyPtr()
  98. if err != nil {
  99. return
  100. }
  101. switch msgp.UnsafeString(field) {
  102. case "iv":
  103. var zhct uint32
  104. zhct, err = dc.ReadArrayHeader()
  105. if err != nil {
  106. return
  107. }
  108. if cap(z.rc.iv) >= int(zhct) {
  109. z.rc.iv = (z.rc.iv)[:zhct]
  110. } else {
  111. z.rc.iv = make([]interval32, zhct)
  112. }
  113. for zbzg := range z.rc.iv {
  114. var zcua uint32
  115. zcua, err = dc.ReadMapHeader()
  116. if err != nil {
  117. return
  118. }
  119. for zcua > 0 {
  120. zcua--
  121. field, err = dc.ReadMapKeyPtr()
  122. if err != nil {
  123. return
  124. }
  125. switch msgp.UnsafeString(field) {
  126. case "start":
  127. z.rc.iv[zbzg].start, err = dc.ReadUint32()
  128. if err != nil {
  129. return
  130. }
  131. case "last":
  132. z.rc.iv[zbzg].last, err = dc.ReadUint32()
  133. if err != nil {
  134. return
  135. }
  136. default:
  137. err = dc.Skip()
  138. if err != nil {
  139. return
  140. }
  141. }
  142. }
  143. }
  144. case "card":
  145. z.rc.card, err = dc.ReadInt64()
  146. if err != nil {
  147. return
  148. }
  149. default:
  150. err = dc.Skip()
  151. if err != nil {
  152. return
  153. }
  154. }
  155. }
  156. }
  157. default:
  158. err = dc.Skip()
  159. if err != nil {
  160. return
  161. }
  162. }
  163. }
  164. return
  165. }
  166. // EncodeMsg implements msgp.Encodable
  167. func (z *addHelper32) EncodeMsg(en *msgp.Writer) (err error) {
  168. // map header, size 5
  169. // write "runstart"
  170. err = en.Append(0x85, 0xa8, 0x72, 0x75, 0x6e, 0x73, 0x74, 0x61, 0x72, 0x74)
  171. if err != nil {
  172. return err
  173. }
  174. err = en.WriteUint32(z.runstart)
  175. if err != nil {
  176. return
  177. }
  178. // write "runlen"
  179. err = en.Append(0xa6, 0x72, 0x75, 0x6e, 0x6c, 0x65, 0x6e)
  180. if err != nil {
  181. return err
  182. }
  183. err = en.WriteUint32(z.runlen)
  184. if err != nil {
  185. return
  186. }
  187. // write "actuallyAdded"
  188. err = en.Append(0xad, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x41, 0x64, 0x64, 0x65, 0x64)
  189. if err != nil {
  190. return err
  191. }
  192. err = en.WriteUint32(z.actuallyAdded)
  193. if err != nil {
  194. return
  195. }
  196. // write "m"
  197. err = en.Append(0xa1, 0x6d)
  198. if err != nil {
  199. return err
  200. }
  201. err = en.WriteArrayHeader(uint32(len(z.m)))
  202. if err != nil {
  203. return
  204. }
  205. for zxvk := range z.m {
  206. // map header, size 2
  207. // write "start"
  208. err = en.Append(0x82, 0xa5, 0x73, 0x74, 0x61, 0x72, 0x74)
  209. if err != nil {
  210. return err
  211. }
  212. err = en.WriteUint32(z.m[zxvk].start)
  213. if err != nil {
  214. return
  215. }
  216. // write "last"
  217. err = en.Append(0xa4, 0x6c, 0x61, 0x73, 0x74)
  218. if err != nil {
  219. return err
  220. }
  221. err = en.WriteUint32(z.m[zxvk].last)
  222. if err != nil {
  223. return
  224. }
  225. }
  226. // write "rc"
  227. err = en.Append(0xa2, 0x72, 0x63)
  228. if err != nil {
  229. return err
  230. }
  231. if z.rc == nil {
  232. err = en.WriteNil()
  233. if err != nil {
  234. return
  235. }
  236. } else {
  237. // map header, size 2
  238. // write "iv"
  239. err = en.Append(0x82, 0xa2, 0x69, 0x76)
  240. if err != nil {
  241. return err
  242. }
  243. err = en.WriteArrayHeader(uint32(len(z.rc.iv)))
  244. if err != nil {
  245. return
  246. }
  247. for zbzg := range z.rc.iv {
  248. // map header, size 2
  249. // write "start"
  250. err = en.Append(0x82, 0xa5, 0x73, 0x74, 0x61, 0x72, 0x74)
  251. if err != nil {
  252. return err
  253. }
  254. err = en.WriteUint32(z.rc.iv[zbzg].start)
  255. if err != nil {
  256. return
  257. }
  258. // write "last"
  259. err = en.Append(0xa4, 0x6c, 0x61, 0x73, 0x74)
  260. if err != nil {
  261. return err
  262. }
  263. err = en.WriteUint32(z.rc.iv[zbzg].last)
  264. if err != nil {
  265. return
  266. }
  267. }
  268. // write "card"
  269. err = en.Append(0xa4, 0x63, 0x61, 0x72, 0x64)
  270. if err != nil {
  271. return err
  272. }
  273. err = en.WriteInt64(z.rc.card)
  274. if err != nil {
  275. return
  276. }
  277. }
  278. return
  279. }
  280. // MarshalMsg implements msgp.Marshaler
  281. func (z *addHelper32) MarshalMsg(b []byte) (o []byte, err error) {
  282. o = msgp.Require(b, z.Msgsize())
  283. // map header, size 5
  284. // string "runstart"
  285. o = append(o, 0x85, 0xa8, 0x72, 0x75, 0x6e, 0x73, 0x74, 0x61, 0x72, 0x74)
  286. o = msgp.AppendUint32(o, z.runstart)
  287. // string "runlen"
  288. o = append(o, 0xa6, 0x72, 0x75, 0x6e, 0x6c, 0x65, 0x6e)
  289. o = msgp.AppendUint32(o, z.runlen)
  290. // string "actuallyAdded"
  291. o = append(o, 0xad, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x41, 0x64, 0x64, 0x65, 0x64)
  292. o = msgp.AppendUint32(o, z.actuallyAdded)
  293. // string "m"
  294. o = append(o, 0xa1, 0x6d)
  295. o = msgp.AppendArrayHeader(o, uint32(len(z.m)))
  296. for zxvk := range z.m {
  297. // map header, size 2
  298. // string "start"
  299. o = append(o, 0x82, 0xa5, 0x73, 0x74, 0x61, 0x72, 0x74)
  300. o = msgp.AppendUint32(o, z.m[zxvk].start)
  301. // string "last"
  302. o = append(o, 0xa4, 0x6c, 0x61, 0x73, 0x74)
  303. o = msgp.AppendUint32(o, z.m[zxvk].last)
  304. }
  305. // string "rc"
  306. o = append(o, 0xa2, 0x72, 0x63)
  307. if z.rc == nil {
  308. o = msgp.AppendNil(o)
  309. } else {
  310. // map header, size 2
  311. // string "iv"
  312. o = append(o, 0x82, 0xa2, 0x69, 0x76)
  313. o = msgp.AppendArrayHeader(o, uint32(len(z.rc.iv)))
  314. for zbzg := range z.rc.iv {
  315. // map header, size 2
  316. // string "start"
  317. o = append(o, 0x82, 0xa5, 0x73, 0x74, 0x61, 0x72, 0x74)
  318. o = msgp.AppendUint32(o, z.rc.iv[zbzg].start)
  319. // string "last"
  320. o = append(o, 0xa4, 0x6c, 0x61, 0x73, 0x74)
  321. o = msgp.AppendUint32(o, z.rc.iv[zbzg].last)
  322. }
  323. // string "card"
  324. o = append(o, 0xa4, 0x63, 0x61, 0x72, 0x64)
  325. o = msgp.AppendInt64(o, z.rc.card)
  326. }
  327. return
  328. }
  329. // UnmarshalMsg implements msgp.Unmarshaler
  330. func (z *addHelper32) UnmarshalMsg(bts []byte) (o []byte, err error) {
  331. var field []byte
  332. _ = field
  333. var zxhx uint32
  334. zxhx, bts, err = msgp.ReadMapHeaderBytes(bts)
  335. if err != nil {
  336. return
  337. }
  338. for zxhx > 0 {
  339. zxhx--
  340. field, bts, err = msgp.ReadMapKeyZC(bts)
  341. if err != nil {
  342. return
  343. }
  344. switch msgp.UnsafeString(field) {
  345. case "runstart":
  346. z.runstart, bts, err = msgp.ReadUint32Bytes(bts)
  347. if err != nil {
  348. return
  349. }
  350. case "runlen":
  351. z.runlen, bts, err = msgp.ReadUint32Bytes(bts)
  352. if err != nil {
  353. return
  354. }
  355. case "actuallyAdded":
  356. z.actuallyAdded, bts, err = msgp.ReadUint32Bytes(bts)
  357. if err != nil {
  358. return
  359. }
  360. case "m":
  361. var zlqf uint32
  362. zlqf, bts, err = msgp.ReadArrayHeaderBytes(bts)
  363. if err != nil {
  364. return
  365. }
  366. if cap(z.m) >= int(zlqf) {
  367. z.m = (z.m)[:zlqf]
  368. } else {
  369. z.m = make([]interval32, zlqf)
  370. }
  371. for zxvk := range z.m {
  372. var zdaf uint32
  373. zdaf, bts, err = msgp.ReadMapHeaderBytes(bts)
  374. if err != nil {
  375. return
  376. }
  377. for zdaf > 0 {
  378. zdaf--
  379. field, bts, err = msgp.ReadMapKeyZC(bts)
  380. if err != nil {
  381. return
  382. }
  383. switch msgp.UnsafeString(field) {
  384. case "start":
  385. z.m[zxvk].start, bts, err = msgp.ReadUint32Bytes(bts)
  386. if err != nil {
  387. return
  388. }
  389. case "last":
  390. z.m[zxvk].last, bts, err = msgp.ReadUint32Bytes(bts)
  391. if err != nil {
  392. return
  393. }
  394. default:
  395. bts, err = msgp.Skip(bts)
  396. if err != nil {
  397. return
  398. }
  399. }
  400. }
  401. }
  402. case "rc":
  403. if msgp.IsNil(bts) {
  404. bts, err = msgp.ReadNilBytes(bts)
  405. if err != nil {
  406. return
  407. }
  408. z.rc = nil
  409. } else {
  410. if z.rc == nil {
  411. z.rc = new(runContainer32)
  412. }
  413. var zpks uint32
  414. zpks, bts, err = msgp.ReadMapHeaderBytes(bts)
  415. if err != nil {
  416. return
  417. }
  418. for zpks > 0 {
  419. zpks--
  420. field, bts, err = msgp.ReadMapKeyZC(bts)
  421. if err != nil {
  422. return
  423. }
  424. switch msgp.UnsafeString(field) {
  425. case "iv":
  426. var zjfb uint32
  427. zjfb, bts, err = msgp.ReadArrayHeaderBytes(bts)
  428. if err != nil {
  429. return
  430. }
  431. if cap(z.rc.iv) >= int(zjfb) {
  432. z.rc.iv = (z.rc.iv)[:zjfb]
  433. } else {
  434. z.rc.iv = make([]interval32, zjfb)
  435. }
  436. for zbzg := range z.rc.iv {
  437. var zcxo uint32
  438. zcxo, bts, err = msgp.ReadMapHeaderBytes(bts)
  439. if err != nil {
  440. return
  441. }
  442. for zcxo > 0 {
  443. zcxo--
  444. field, bts, err = msgp.ReadMapKeyZC(bts)
  445. if err != nil {
  446. return
  447. }
  448. switch msgp.UnsafeString(field) {
  449. case "start":
  450. z.rc.iv[zbzg].start, bts, err = msgp.ReadUint32Bytes(bts)
  451. if err != nil {
  452. return
  453. }
  454. case "last":
  455. z.rc.iv[zbzg].last, bts, err = msgp.ReadUint32Bytes(bts)
  456. if err != nil {
  457. return
  458. }
  459. default:
  460. bts, err = msgp.Skip(bts)
  461. if err != nil {
  462. return
  463. }
  464. }
  465. }
  466. }
  467. case "card":
  468. z.rc.card, bts, err = msgp.ReadInt64Bytes(bts)
  469. if err != nil {
  470. return
  471. }
  472. default:
  473. bts, err = msgp.Skip(bts)
  474. if err != nil {
  475. return
  476. }
  477. }
  478. }
  479. }
  480. default:
  481. bts, err = msgp.Skip(bts)
  482. if err != nil {
  483. return
  484. }
  485. }
  486. }
  487. o = bts
  488. return
  489. }
  490. // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
  491. func (z *addHelper32) Msgsize() (s int) {
  492. s = 1 + 9 + msgp.Uint32Size + 7 + msgp.Uint32Size + 14 + msgp.Uint32Size + 2 + msgp.ArrayHeaderSize + (len(z.m) * (12 + msgp.Uint32Size + msgp.Uint32Size)) + 3
  493. if z.rc == nil {
  494. s += msgp.NilSize
  495. } else {
  496. s += 1 + 3 + msgp.ArrayHeaderSize + (len(z.rc.iv) * (12 + msgp.Uint32Size + msgp.Uint32Size)) + 5 + msgp.Int64Size
  497. }
  498. return
  499. }
  500. // DecodeMsg implements msgp.Decodable
  501. func (z *interval32) DecodeMsg(dc *msgp.Reader) (err error) {
  502. var field []byte
  503. _ = field
  504. var zeff uint32
  505. zeff, err = dc.ReadMapHeader()
  506. if err != nil {
  507. return
  508. }
  509. for zeff > 0 {
  510. zeff--
  511. field, err = dc.ReadMapKeyPtr()
  512. if err != nil {
  513. return
  514. }
  515. switch msgp.UnsafeString(field) {
  516. case "start":
  517. z.start, err = dc.ReadUint32()
  518. if err != nil {
  519. return
  520. }
  521. case "last":
  522. z.last, err = dc.ReadUint32()
  523. if err != nil {
  524. return
  525. }
  526. default:
  527. err = dc.Skip()
  528. if err != nil {
  529. return
  530. }
  531. }
  532. }
  533. return
  534. }
  535. // EncodeMsg implements msgp.Encodable
  536. func (z interval32) EncodeMsg(en *msgp.Writer) (err error) {
  537. // map header, size 2
  538. // write "start"
  539. err = en.Append(0x82, 0xa5, 0x73, 0x74, 0x61, 0x72, 0x74)
  540. if err != nil {
  541. return err
  542. }
  543. err = en.WriteUint32(z.start)
  544. if err != nil {
  545. return
  546. }
  547. // write "last"
  548. err = en.Append(0xa4, 0x6c, 0x61, 0x73, 0x74)
  549. if err != nil {
  550. return err
  551. }
  552. err = en.WriteUint32(z.last)
  553. if err != nil {
  554. return
  555. }
  556. return
  557. }
  558. // MarshalMsg implements msgp.Marshaler
  559. func (z interval32) MarshalMsg(b []byte) (o []byte, err error) {
  560. o = msgp.Require(b, z.Msgsize())
  561. // map header, size 2
  562. // string "start"
  563. o = append(o, 0x82, 0xa5, 0x73, 0x74, 0x61, 0x72, 0x74)
  564. o = msgp.AppendUint32(o, z.start)
  565. // string "last"
  566. o = append(o, 0xa4, 0x6c, 0x61, 0x73, 0x74)
  567. o = msgp.AppendUint32(o, z.last)
  568. return
  569. }
  570. // UnmarshalMsg implements msgp.Unmarshaler
  571. func (z *interval32) UnmarshalMsg(bts []byte) (o []byte, err error) {
  572. var field []byte
  573. _ = field
  574. var zrsw uint32
  575. zrsw, bts, err = msgp.ReadMapHeaderBytes(bts)
  576. if err != nil {
  577. return
  578. }
  579. for zrsw > 0 {
  580. zrsw--
  581. field, bts, err = msgp.ReadMapKeyZC(bts)
  582. if err != nil {
  583. return
  584. }
  585. switch msgp.UnsafeString(field) {
  586. case "start":
  587. z.start, bts, err = msgp.ReadUint32Bytes(bts)
  588. if err != nil {
  589. return
  590. }
  591. case "last":
  592. z.last, bts, err = msgp.ReadUint32Bytes(bts)
  593. if err != nil {
  594. return
  595. }
  596. default:
  597. bts, err = msgp.Skip(bts)
  598. if err != nil {
  599. return
  600. }
  601. }
  602. }
  603. o = bts
  604. return
  605. }
  606. // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
  607. func (z interval32) Msgsize() (s int) {
  608. s = 1 + 6 + msgp.Uint32Size + 5 + msgp.Uint32Size
  609. return
  610. }
  611. // DecodeMsg implements msgp.Decodable
  612. func (z *runContainer32) DecodeMsg(dc *msgp.Reader) (err error) {
  613. var field []byte
  614. _ = field
  615. var zdnj uint32
  616. zdnj, err = dc.ReadMapHeader()
  617. if err != nil {
  618. return
  619. }
  620. for zdnj > 0 {
  621. zdnj--
  622. field, err = dc.ReadMapKeyPtr()
  623. if err != nil {
  624. return
  625. }
  626. switch msgp.UnsafeString(field) {
  627. case "iv":
  628. var zobc uint32
  629. zobc, err = dc.ReadArrayHeader()
  630. if err != nil {
  631. return
  632. }
  633. if cap(z.iv) >= int(zobc) {
  634. z.iv = (z.iv)[:zobc]
  635. } else {
  636. z.iv = make([]interval32, zobc)
  637. }
  638. for zxpk := range z.iv {
  639. var zsnv uint32
  640. zsnv, err = dc.ReadMapHeader()
  641. if err != nil {
  642. return
  643. }
  644. for zsnv > 0 {
  645. zsnv--
  646. field, err = dc.ReadMapKeyPtr()
  647. if err != nil {
  648. return
  649. }
  650. switch msgp.UnsafeString(field) {
  651. case "start":
  652. z.iv[zxpk].start, err = dc.ReadUint32()
  653. if err != nil {
  654. return
  655. }
  656. case "last":
  657. z.iv[zxpk].last, err = dc.ReadUint32()
  658. if err != nil {
  659. return
  660. }
  661. default:
  662. err = dc.Skip()
  663. if err != nil {
  664. return
  665. }
  666. }
  667. }
  668. }
  669. case "card":
  670. z.card, err = dc.ReadInt64()
  671. if err != nil {
  672. return
  673. }
  674. default:
  675. err = dc.Skip()
  676. if err != nil {
  677. return
  678. }
  679. }
  680. }
  681. return
  682. }
  683. // EncodeMsg implements msgp.Encodable
  684. func (z *runContainer32) EncodeMsg(en *msgp.Writer) (err error) {
  685. // map header, size 2
  686. // write "iv"
  687. err = en.Append(0x82, 0xa2, 0x69, 0x76)
  688. if err != nil {
  689. return err
  690. }
  691. err = en.WriteArrayHeader(uint32(len(z.iv)))
  692. if err != nil {
  693. return
  694. }
  695. for zxpk := range z.iv {
  696. // map header, size 2
  697. // write "start"
  698. err = en.Append(0x82, 0xa5, 0x73, 0x74, 0x61, 0x72, 0x74)
  699. if err != nil {
  700. return err
  701. }
  702. err = en.WriteUint32(z.iv[zxpk].start)
  703. if err != nil {
  704. return
  705. }
  706. // write "last"
  707. err = en.Append(0xa4, 0x6c, 0x61, 0x73, 0x74)
  708. if err != nil {
  709. return err
  710. }
  711. err = en.WriteUint32(z.iv[zxpk].last)
  712. if err != nil {
  713. return
  714. }
  715. }
  716. // write "card"
  717. err = en.Append(0xa4, 0x63, 0x61, 0x72, 0x64)
  718. if err != nil {
  719. return err
  720. }
  721. err = en.WriteInt64(z.card)
  722. if err != nil {
  723. return
  724. }
  725. return
  726. }
  727. // MarshalMsg implements msgp.Marshaler
  728. func (z *runContainer32) MarshalMsg(b []byte) (o []byte, err error) {
  729. o = msgp.Require(b, z.Msgsize())
  730. // map header, size 2
  731. // string "iv"
  732. o = append(o, 0x82, 0xa2, 0x69, 0x76)
  733. o = msgp.AppendArrayHeader(o, uint32(len(z.iv)))
  734. for zxpk := range z.iv {
  735. // map header, size 2
  736. // string "start"
  737. o = append(o, 0x82, 0xa5, 0x73, 0x74, 0x61, 0x72, 0x74)
  738. o = msgp.AppendUint32(o, z.iv[zxpk].start)
  739. // string "last"
  740. o = append(o, 0xa4, 0x6c, 0x61, 0x73, 0x74)
  741. o = msgp.AppendUint32(o, z.iv[zxpk].last)
  742. }
  743. // string "card"
  744. o = append(o, 0xa4, 0x63, 0x61, 0x72, 0x64)
  745. o = msgp.AppendInt64(o, z.card)
  746. return
  747. }
  748. // UnmarshalMsg implements msgp.Unmarshaler
  749. func (z *runContainer32) UnmarshalMsg(bts []byte) (o []byte, err error) {
  750. var field []byte
  751. _ = field
  752. var zkgt uint32
  753. zkgt, bts, err = msgp.ReadMapHeaderBytes(bts)
  754. if err != nil {
  755. return
  756. }
  757. for zkgt > 0 {
  758. zkgt--
  759. field, bts, err = msgp.ReadMapKeyZC(bts)
  760. if err != nil {
  761. return
  762. }
  763. switch msgp.UnsafeString(field) {
  764. case "iv":
  765. var zema uint32
  766. zema, bts, err = msgp.ReadArrayHeaderBytes(bts)
  767. if err != nil {
  768. return
  769. }
  770. if cap(z.iv) >= int(zema) {
  771. z.iv = (z.iv)[:zema]
  772. } else {
  773. z.iv = make([]interval32, zema)
  774. }
  775. for zxpk := range z.iv {
  776. var zpez uint32
  777. zpez, bts, err = msgp.ReadMapHeaderBytes(bts)
  778. if err != nil {
  779. return
  780. }
  781. for zpez > 0 {
  782. zpez--
  783. field, bts, err = msgp.ReadMapKeyZC(bts)
  784. if err != nil {
  785. return
  786. }
  787. switch msgp.UnsafeString(field) {
  788. case "start":
  789. z.iv[zxpk].start, bts, err = msgp.ReadUint32Bytes(bts)
  790. if err != nil {
  791. return
  792. }
  793. case "last":
  794. z.iv[zxpk].last, bts, err = msgp.ReadUint32Bytes(bts)
  795. if err != nil {
  796. return
  797. }
  798. default:
  799. bts, err = msgp.Skip(bts)
  800. if err != nil {
  801. return
  802. }
  803. }
  804. }
  805. }
  806. case "card":
  807. z.card, bts, err = msgp.ReadInt64Bytes(bts)
  808. if err != nil {
  809. return
  810. }
  811. default:
  812. bts, err = msgp.Skip(bts)
  813. if err != nil {
  814. return
  815. }
  816. }
  817. }
  818. o = bts
  819. return
  820. }
  821. // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
  822. func (z *runContainer32) Msgsize() (s int) {
  823. s = 1 + 3 + msgp.ArrayHeaderSize + (len(z.iv) * (12 + msgp.Uint32Size + msgp.Uint32Size)) + 5 + msgp.Int64Size
  824. return
  825. }
  826. // DecodeMsg implements msgp.Decodable
  827. func (z *runIterator32) DecodeMsg(dc *msgp.Reader) (err error) {
  828. var field []byte
  829. _ = field
  830. var zqke uint32
  831. zqke, err = dc.ReadMapHeader()
  832. if err != nil {
  833. return
  834. }
  835. for zqke > 0 {
  836. zqke--
  837. field, err = dc.ReadMapKeyPtr()
  838. if err != nil {
  839. return
  840. }
  841. switch msgp.UnsafeString(field) {
  842. case "rc":
  843. if dc.IsNil() {
  844. err = dc.ReadNil()
  845. if err != nil {
  846. return
  847. }
  848. z.rc = nil
  849. } else {
  850. if z.rc == nil {
  851. z.rc = new(runContainer32)
  852. }
  853. err = z.rc.DecodeMsg(dc)
  854. if err != nil {
  855. return
  856. }
  857. }
  858. case "curIndex":
  859. z.curIndex, err = dc.ReadInt64()
  860. if err != nil {
  861. return
  862. }
  863. case "curPosInIndex":
  864. z.curPosInIndex, err = dc.ReadUint32()
  865. if err != nil {
  866. return
  867. }
  868. case "curSeq":
  869. z.curSeq, err = dc.ReadInt64()
  870. if err != nil {
  871. return
  872. }
  873. default:
  874. err = dc.Skip()
  875. if err != nil {
  876. return
  877. }
  878. }
  879. }
  880. return
  881. }
  882. // EncodeMsg implements msgp.Encodable
  883. func (z *runIterator32) EncodeMsg(en *msgp.Writer) (err error) {
  884. // map header, size 4
  885. // write "rc"
  886. err = en.Append(0x84, 0xa2, 0x72, 0x63)
  887. if err != nil {
  888. return err
  889. }
  890. if z.rc == nil {
  891. err = en.WriteNil()
  892. if err != nil {
  893. return
  894. }
  895. } else {
  896. err = z.rc.EncodeMsg(en)
  897. if err != nil {
  898. return
  899. }
  900. }
  901. // write "curIndex"
  902. err = en.Append(0xa8, 0x63, 0x75, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78)
  903. if err != nil {
  904. return err
  905. }
  906. err = en.WriteInt64(z.curIndex)
  907. if err != nil {
  908. return
  909. }
  910. // write "curPosInIndex"
  911. err = en.Append(0xad, 0x63, 0x75, 0x72, 0x50, 0x6f, 0x73, 0x49, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78)
  912. if err != nil {
  913. return err
  914. }
  915. err = en.WriteUint32(z.curPosInIndex)
  916. if err != nil {
  917. return
  918. }
  919. // write "curSeq"
  920. err = en.Append(0xa6, 0x63, 0x75, 0x72, 0x53, 0x65, 0x71)
  921. if err != nil {
  922. return err
  923. }
  924. err = en.WriteInt64(z.curSeq)
  925. if err != nil {
  926. return
  927. }
  928. return
  929. }
  930. // MarshalMsg implements msgp.Marshaler
  931. func (z *runIterator32) MarshalMsg(b []byte) (o []byte, err error) {
  932. o = msgp.Require(b, z.Msgsize())
  933. // map header, size 4
  934. // string "rc"
  935. o = append(o, 0x84, 0xa2, 0x72, 0x63)
  936. if z.rc == nil {
  937. o = msgp.AppendNil(o)
  938. } else {
  939. o, err = z.rc.MarshalMsg(o)
  940. if err != nil {
  941. return
  942. }
  943. }
  944. // string "curIndex"
  945. o = append(o, 0xa8, 0x63, 0x75, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78)
  946. o = msgp.AppendInt64(o, z.curIndex)
  947. // string "curPosInIndex"
  948. o = append(o, 0xad, 0x63, 0x75, 0x72, 0x50, 0x6f, 0x73, 0x49, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78)
  949. o = msgp.AppendUint32(o, z.curPosInIndex)
  950. // string "curSeq"
  951. o = append(o, 0xa6, 0x63, 0x75, 0x72, 0x53, 0x65, 0x71)
  952. o = msgp.AppendInt64(o, z.curSeq)
  953. return
  954. }
  955. // UnmarshalMsg implements msgp.Unmarshaler
  956. func (z *runIterator32) UnmarshalMsg(bts []byte) (o []byte, err error) {
  957. var field []byte
  958. _ = field
  959. var zqyh uint32
  960. zqyh, bts, err = msgp.ReadMapHeaderBytes(bts)
  961. if err != nil {
  962. return
  963. }
  964. for zqyh > 0 {
  965. zqyh--
  966. field, bts, err = msgp.ReadMapKeyZC(bts)
  967. if err != nil {
  968. return
  969. }
  970. switch msgp.UnsafeString(field) {
  971. case "rc":
  972. if msgp.IsNil(bts) {
  973. bts, err = msgp.ReadNilBytes(bts)
  974. if err != nil {
  975. return
  976. }
  977. z.rc = nil
  978. } else {
  979. if z.rc == nil {
  980. z.rc = new(runContainer32)
  981. }
  982. bts, err = z.rc.UnmarshalMsg(bts)
  983. if err != nil {
  984. return
  985. }
  986. }
  987. case "curIndex":
  988. z.curIndex, bts, err = msgp.ReadInt64Bytes(bts)
  989. if err != nil {
  990. return
  991. }
  992. case "curPosInIndex":
  993. z.curPosInIndex, bts, err = msgp.ReadUint32Bytes(bts)
  994. if err != nil {
  995. return
  996. }
  997. case "curSeq":
  998. z.curSeq, bts, err = msgp.ReadInt64Bytes(bts)
  999. if err != nil {
  1000. return
  1001. }
  1002. default:
  1003. bts, err = msgp.Skip(bts)
  1004. if err != nil {
  1005. return
  1006. }
  1007. }
  1008. }
  1009. o = bts
  1010. return
  1011. }
  1012. // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
  1013. func (z *runIterator32) Msgsize() (s int) {
  1014. s = 1 + 3
  1015. if z.rc == nil {
  1016. s += msgp.NilSize
  1017. } else {
  1018. s += z.rc.Msgsize()
  1019. }
  1020. s += 9 + msgp.Int64Size + 14 + msgp.Uint32Size + 7 + msgp.Int64Size
  1021. return
  1022. }
  1023. // DecodeMsg implements msgp.Decodable
  1024. func (z *uint32Slice) DecodeMsg(dc *msgp.Reader) (err error) {
  1025. var zjpj uint32
  1026. zjpj, err = dc.ReadArrayHeader()
  1027. if err != nil {
  1028. return
  1029. }
  1030. if cap((*z)) >= int(zjpj) {
  1031. (*z) = (*z)[:zjpj]
  1032. } else {
  1033. (*z) = make(uint32Slice, zjpj)
  1034. }
  1035. for zywj := range *z {
  1036. (*z)[zywj], err = dc.ReadUint32()
  1037. if err != nil {
  1038. return
  1039. }
  1040. }
  1041. return
  1042. }
  1043. // EncodeMsg implements msgp.Encodable
  1044. func (z uint32Slice) EncodeMsg(en *msgp.Writer) (err error) {
  1045. err = en.WriteArrayHeader(uint32(len(z)))
  1046. if err != nil {
  1047. return
  1048. }
  1049. for zzpf := range z {
  1050. err = en.WriteUint32(z[zzpf])
  1051. if err != nil {
  1052. return
  1053. }
  1054. }
  1055. return
  1056. }
  1057. // MarshalMsg implements msgp.Marshaler
  1058. func (z uint32Slice) MarshalMsg(b []byte) (o []byte, err error) {
  1059. o = msgp.Require(b, z.Msgsize())
  1060. o = msgp.AppendArrayHeader(o, uint32(len(z)))
  1061. for zzpf := range z {
  1062. o = msgp.AppendUint32(o, z[zzpf])
  1063. }
  1064. return
  1065. }
  1066. // UnmarshalMsg implements msgp.Unmarshaler
  1067. func (z *uint32Slice) UnmarshalMsg(bts []byte) (o []byte, err error) {
  1068. var zgmo uint32
  1069. zgmo, bts, err = msgp.ReadArrayHeaderBytes(bts)
  1070. if err != nil {
  1071. return
  1072. }
  1073. if cap((*z)) >= int(zgmo) {
  1074. (*z) = (*z)[:zgmo]
  1075. } else {
  1076. (*z) = make(uint32Slice, zgmo)
  1077. }
  1078. for zrfe := range *z {
  1079. (*z)[zrfe], bts, err = msgp.ReadUint32Bytes(bts)
  1080. if err != nil {
  1081. return
  1082. }
  1083. }
  1084. o = bts
  1085. return
  1086. }
  1087. // Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
  1088. func (z uint32Slice) Msgsize() (s int) {
  1089. s = msgp.ArrayHeaderSize + (len(z) * (msgp.Uint32Size))
  1090. return
  1091. }
上海开阖软件有限公司 沪ICP备12045867号-1