-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
35 lines (31 loc) · 826 Bytes
/
types.go
File metadata and controls
35 lines (31 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* Copyright (c) 2022, arivum.
* All rights reserved.
* SPDX-License-Identifier: MIT
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
package msgpack
import (
"bufio"
"io"
"sync"
)
type Decoder struct {
buf *preallocBuf
underlayingReader io.Reader
r *bufio.Reader
s chan interface{}
mapDecoderFuncsByLen []func() (map[string]interface{}, error)
sliceDecoderFuncsByLen []func() ([]interface{}, error)
lastError error
twoBytes [2]byte
fourBytes [4]byte
eightBytes [8]byte
nextByte byte
closeOnce sync.Once
closeChan chan struct{}
}
type preallocBuf struct {
buf []byte
index int
}