Go语言中文网 为您找到相关结果 1

求助贴:snappy-go使用有问题

代码: contBytes := make([]byte,1024) stringsReader := strings.NewReader(pbMsg.GetBody().GetReqData().GetContent()) snappyReader := snappy.NewReader(stringsReader) rNum, _ := snappyReader.Read(conBytes) fmt.Println("rNum", rNum) 在实际项目中,使用了protobuf 和 snappy,pbMsg.GetBody().GetReqData().GetContent()返回的是一个被snappy压缩过的字符...阅读全文