wp
This commit is contained in:
34
qb.go
34
qb.go
@@ -23,34 +23,36 @@ const (
|
||||
)
|
||||
|
||||
type TimestampCompressor interface {
|
||||
CalcRequiredSpace(uint32) (int, int)
|
||||
Append(int, uint32)
|
||||
Size() int
|
||||
Chunks() [][]byte
|
||||
DeleteLast()
|
||||
Renew()
|
||||
// (timestamp) => compressionWay, requiredSpace
|
||||
Evaluate(uint32) (int, int)
|
||||
Compress(int, uint32)
|
||||
//Size() int
|
||||
//Chunks() [][]byte
|
||||
//DeleteLast()
|
||||
CaptureState()
|
||||
ForgetCapturedState()
|
||||
CreateDecompressor() TimestampDecompressor
|
||||
Snapshot() ([]byte, []byte) // payload, additional payload
|
||||
Snapshot() ([]byte, []byte) // tail, head
|
||||
Offset() int
|
||||
Sync()
|
||||
Rotate([]byte) int // payloadSize
|
||||
//LastTimestamp() uint32
|
||||
}
|
||||
|
||||
type ValueCompressor interface {
|
||||
CalcRequiredSpace(float64) int
|
||||
Append(float64)
|
||||
Size() int
|
||||
Chunks() [][]byte
|
||||
DeleteLast()
|
||||
// (value) => compressionWay, requiredSpace
|
||||
Evaluate(float64) (int, int)
|
||||
Compress(int, float64)
|
||||
//Size() int
|
||||
//Chunks() [][]byte
|
||||
//DeleteLast()
|
||||
Renew() // створює новий conbuf, але не чіпає state
|
||||
Lock()
|
||||
Unlock()
|
||||
CaptureState()
|
||||
ForgetCapturedState()
|
||||
// fracDigits
|
||||
CreateDecompressor(byte) ValueDecompressor
|
||||
Snapshot() ([][]byte, int) // chunks, size
|
||||
Snapshot() ([]byte, []byte) // tail, head
|
||||
Offset() int
|
||||
Rotate([]byte) int // payloadSize
|
||||
//LastValue() float64
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user