This commit is contained in:
2026-06-12 14:21:14 +00:00
parent 58db58a0a0
commit bf22e9a85e
7 changed files with 168 additions and 147 deletions

7
qb.go
View File

@@ -29,7 +29,7 @@ type TimestampCompressor interface {
// (rewindOffset, change, timestamp)
Append(int, []byte, uint32)
Size() int
//Chunks() [][]byte
StoredSize() int
//DeleteLast()
CaptureState()
// (offset) => payload
@@ -38,7 +38,7 @@ type TimestampCompressor interface {
//Payload() []byte // для снапшота
// Offset() int
ReplaceBuffer([]byte)
WritePayloadTo(io.Writer, *TimeDeltaCapturedState) error
WriteStoredTo(io.Writer) error
LastTimestamp() uint32
ReplaceSinceWithUntil() uint32
}
@@ -63,6 +63,7 @@ type ValueCompressor interface {
// (rewindOffset, change, value, delta)
Append(int, []byte, float64, uint64)
Size() int
StoredSize() int
//Chunks() [][]byte
//DeleteLast()
CaptureState()
@@ -73,7 +74,7 @@ type ValueCompressor interface {
//Payload() []byte // для снапшота
//Offset() int
ReplaceBuffer([]byte)
WritePayloadTo(io.Writer, *ValueDeltaCapturedState) error
WriteStoredTo(io.Writer) error
LastValue() float64
}