This commit is contained in:
2026-06-12 00:29:02 +03:00
parent ed203195fa
commit dc0410c9e4
8 changed files with 161 additions and 259 deletions

23
qb.go
View File

@@ -31,17 +31,23 @@ type TimestampCompressor interface {
Size() int
//Chunks() [][]byte
//DeleteLast()
CaptureState()
ForgetCapturedState()
CaptureState() TimeDeltaCapturedState
CreateDecompressor() TimestampDecompressor
//Payload() []byte // для снапшота
// Offset() int
Rotate([]byte)
WritePayloadTo(io.Writer) error
WritePayloadTo(io.Writer, *TimeDeltaCapturedState) error
LastTimestamp() uint32
ReplaceSinceWithUntil() uint32
}
type TimeDeltaCapturedState struct {
H byte
LastUnixtime uint32
LastDelta uint32
Payload []byte
}
type TimeEvaluationReport struct {
TotalSpace int
Offset int
@@ -56,17 +62,22 @@ type ValueCompressor interface {
Size() int
//Chunks() [][]byte
//DeleteLast()
CaptureState()
ForgetCapturedState()
CaptureState() ValueDeltaCapturedState
// fracDigits
CreateDecompressor() ValueDecompressor
//Payload() []byte // для снапшота
//Offset() int
Rotate([]byte)
WritePayloadTo(io.Writer) error
WritePayloadTo(io.Writer, *ValueDeltaCapturedState) error
LastValue() float64
}
type ValueDeltaCapturedState struct {
H byte
LastDelta uint64
Payload []byte
}
type ValueEvaluationReport struct {
TotalSpace int
Offset int