Debian Codegraph @

nonclobbering/experimental/s2/s2.go

raw
1 // Copyright 2023 Mostyn Bramley-Moore.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 // Package github.com/mostynb/go-grpc-compression/nonclobbering/experimental/s2
16 // is a wrapper for using github.com/klauspost/compress/s2 stream compression
17 // with gRPC.
18 //
19 // If you import this package, it will only register itself as the encoder
20 // for the "s2" compressor if no other compressors have already been
21 // registered with that name.
22 //
23 // If you do want to override previously registered "s2" compressors,
24 // then you should instead import
25 // github.com/mostynb/go-grpc-compression/experimental/s2
26 package s2
27
28 import (
29 internals2 "github.com/mostynb/go-grpc-compression/internal/s2"
30 )
31
32 const Name = internals2.Name
33
34 func init() {
35 clobbering := false
36 internals2.PretendInit(clobbering)
37 }