Split out seeds

This commit is contained in:
Ian Gulliver
2023-12-26 08:12:24 -08:00
parent 0d95420bdf
commit 77fc700dc9
2 changed files with 4 additions and 3 deletions

View File

@@ -7,11 +7,12 @@ import (
"github.com/samber/lo" "github.com/samber/lo"
"github.com/securemesh/coding" "github.com/securemesh/coding"
"github.com/securemesh/coding/seeds"
) )
func TestSimple(t *testing.T) { func TestSimple(t *testing.T) {
msg := []byte("this is a test. this is only a test.") msg := []byte("this is a test. this is only a test.")
encoded := coding.Encode(coding.ChatHeap(), msg) encoded := coding.Encode(seeds.ChatHeap(), msg)
t.Logf("orig=%d encoded=%d", len(msg), len(encoded)) t.Logf("orig=%d encoded=%d", len(msg), len(encoded))
} }
@@ -26,7 +27,7 @@ func TestSMS(t *testing.T) {
for s.Scan() { for s.Scan() {
msg := s.Bytes() msg := s.Bytes()
e := coding.Encode(coding.ChatHeap(), msg) e := coding.Encode(seeds.ChatHeap(), msg)
orig += len(msg) orig += len(msg)
encoded += len(e) encoded += len(e)
} }

View File

@@ -1,4 +1,4 @@
package coding package seeds
import ( import (
"github.com/securemesh/coding/heap" "github.com/securemesh/coding/heap"