mirror of https://github.com/ethereum/go-ethereum
Compress data on db level. Closes #174
parent
bd4f51ff3c
commit
76c9c8d653
@ -1,6 +1,28 @@ |
||||
package ethdb |
||||
|
||||
/* |
||||
import ( |
||||
_ "fmt" |
||||
_ "testing" |
||||
"bytes" |
||||
"testing" |
||||
) |
||||
|
||||
func TestCompression(t *testing.T) { |
||||
ethutil.ReadConfig("", "/tmp", "") |
||||
|
||||
db, err := NewLDBDatabase("testdb") |
||||
if err != nil { |
||||
t.Fatal(err) |
||||
} |
||||
|
||||
in := make([]byte, 10) |
||||
db.Put([]byte("test1"), in) |
||||
out, err := db.Get([]byte("test1")) |
||||
if err != nil { |
||||
t.Fatal(err) |
||||
} |
||||
|
||||
if bytes.Compare(out, in) != 0 { |
||||
t.Error("put get", in, out) |
||||
} |
||||
} |
||||
*/ |
||||
|
Loading…
Reference in new issue