wp
This commit is contained in:
@@ -45,8 +45,13 @@ func (s *ReverseTimeDeltaCompressor) Size() int {
|
||||
return s.pos
|
||||
}
|
||||
|
||||
//func (s *ReverseTimeDeltaCompressor) CalcRequiredSpace(value float64) int {
|
||||
//}
|
||||
func (s *ReverseTimeDeltaCompressor) Chunks() [][]byte {
|
||||
return s.buf.Chunks()
|
||||
}
|
||||
|
||||
func (s *ReverseTimeDeltaCompressor) CalcRequiredSpace(value uint32) int {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (s *ReverseTimeDeltaCompressor) Append(unixtime uint32) {
|
||||
if s.lastUnixtime > 0 {
|
||||
@@ -154,7 +159,7 @@ type TimeDeltaBound struct {
|
||||
}
|
||||
|
||||
// delta h
|
||||
func (s *ReverseTimeDeltaCompressor) GetState() TimeDeltaBound {
|
||||
func (s *ReverseTimeDeltaCompressor) GetState() TimeDeltaBound { // fix replace by Lock
|
||||
bound := TimeDeltaBound{
|
||||
LastUnixtime: s.lastUnixtime,
|
||||
}
|
||||
@@ -166,6 +171,24 @@ func (s *ReverseTimeDeltaCompressor) GetState() TimeDeltaBound {
|
||||
return bound
|
||||
}
|
||||
|
||||
func (s *ReverseTimeDeltaCompressor) Lock() {
|
||||
// fix
|
||||
}
|
||||
|
||||
func (s *ReverseTimeDeltaCompressor) Unlock() {
|
||||
//s.state = nil // fix
|
||||
}
|
||||
|
||||
func (s *ReverseTimeDeltaCompressor) Renew() {
|
||||
// s.buf = conbuf.New(nil)
|
||||
// s.pos = 0
|
||||
// //
|
||||
// s.baseValue = 0
|
||||
// s.lastDelta = 0
|
||||
// s.lastDeltaSize = 0
|
||||
// s.h = 0
|
||||
}
|
||||
|
||||
// DECOMPRESSOR
|
||||
|
||||
type ReverseTimeDeltaDecompressor struct {
|
||||
|
||||
Reference in New Issue
Block a user