Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Commit

Permalink
Remove FromData function
Browse files Browse the repository at this point in the history
Signed-off-by: zhulongcheng <[email protected]>
  • Loading branch information
zhulongcheng committed Mar 5, 2019
1 parent 08af7bb commit 67f32dd
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions chunkenc/chunk.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
package chunkenc

import (
"fmt"
"sync"

"github.com/pkg/errors"
Expand Down Expand Up @@ -48,15 +47,6 @@ type Chunk interface {
NumSamples() int
}

// FromData returns a chunk from a byte slice of chunk data.
func FromData(e Encoding, d []byte) (Chunk, error) {
switch e {
case EncXOR:
return &XORChunk{b: bstream{count: 0, stream: d}}, nil
}
return nil, fmt.Errorf("unknown chunk encoding: %d", e)
}

// Appender adds sample pairs to a chunk.
type Appender interface {
Append(int64, float64)
Expand Down

0 comments on commit 67f32dd

Please sign in to comment.