https://github.com/un000/grpc-snappy
GRPC Snappy compressor for GO
https://github.com/un000/grpc-snappy
compressor go golang grpc grpc-go protobuf snappy
Last synced: 2 months ago
JSON representation
GRPC Snappy compressor for GO
- Host: GitHub
- URL: https://github.com/un000/grpc-snappy
- Owner: un000
- Created: 2018-04-09T19:39:40.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-25T12:39:42.000Z (almost 7 years ago)
- Last Synced: 2025-10-13T02:41:59.159Z (6 months ago)
- Topics: compressor, go, golang, grpc, grpc-go, protobuf, snappy
- Language: Go
- Size: 38.1 KB
- Stars: 7
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# How to use
At the server side, you need to import package to run initializer
```
import _ "github.com/un000/grpc-snappy"
```
At the client use DialOptions:
```
var dialOpts = []grpc.DialOption{
grpc.WithInsecure(),
grpc.WithDefaultCallOptions(grpc.UseCompressor(snappy.Name)),
}
conn, err := grpc.Dial(
"your-grpc-address:port",
dialOpts...,
)
```
For more information, please visit the official docs:
https://github.com/grpc/grpc-go/blob/master/Documentation/compression.md