MCPcopy Create free account
hub / github.com/pion/dtls / EncodeCompressionMethods

Function EncodeCompressionMethods

pkg/protocol/compression_method.go:46–54  ·  view source on GitHub ↗

EncodeCompressionMethods the given compression methods.

(c []*CompressionMethod)

Source from the content-addressed store, hash-verified

44
45// EncodeCompressionMethods the given compression methods.
46func EncodeCompressionMethods(c []*CompressionMethod) []byte {
47 //nolint:gosec // G115: TLS encodes compression_methods vector length as a single byte.
48 out := []byte{byte(len(c))}
49 for i := len(c); i > 0; i-- {
50 out = append(out, byte(c[i-1].ID))
51 }
52
53 return out
54}

Callers 1

MarshalMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…