diff --git a/rpc_client.go b/rpc_client.go index 2c6fb16..8725c90 100644 --- a/rpc_client.go +++ b/rpc_client.go @@ -99,7 +99,7 @@ func (cli *RPCClient) run() { } defer stream.CloseSend() - var ticker = time.NewTicker(time.Millisecond * 200) + var ticker = time.NewTicker(time.Millisecond * 1) buf := bytes.NewBuffer(nil) for { diff --git a/utils.go b/utils.go index 7964471..eb4e004 100644 --- a/utils.go +++ b/utils.go @@ -7,8 +7,6 @@ import ( "io" "log" "net" - - "github.com/klauspost/compress/zstd" ) func Compress(writer io.Writer, data [][]byte) { @@ -22,14 +20,14 @@ func Compress(writer io.Writer, data [][]byte) { } // zstd compress - zenc, err := zstd.NewWriter(writer) - if err != nil { - log.Panic(err) - } - err = zenc.Flush() - if err != nil { - log.Println(err) - } + // zenc, err := zstd.NewWriter(writer) + // if err != nil { + // log.Panic(err) + // } + // err = zenc.Flush() + // if err != nil { + // log.Println(err) + // } } @@ -37,12 +35,12 @@ func Decompress(data []byte) (frames [][]byte) { var err error var buf = bytes.NewBuffer(data) - var zdec *zstd.Decoder - zdec, err = zstd.NewReader(buf) - if err != nil { - log.Panic(err) - } - zdec.Close() + // var zdec *zstd.Decoder + // zdec, err = zstd.NewReader(buf) + // if err != nil { + // log.Panic(err) + // } + // zdec.Close() dec := gob.NewDecoder(buf) err = dec.Decode(&frames)