This commit is contained in:
glidea
2025-04-19 15:50:26 +08:00
commit 8b33df8a05
109 changed files with 24407 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
package index
import (
"context"
"io"
)
// Codec defines interface for encoding and decoding index.
type Codec interface {
// EncodeTo encodes the index to the given writer.
EncodeTo(ctx context.Context, w io.Writer) (err error)
// DecodeFrom decodes the index from the given reader.
DecodeFrom(ctx context.Context, r io.Reader) (err error)
}