MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / EncodeBase64

Method EncodeBase64

pkg/util/intsets/fast.go:318–320  ·  view source on GitHub ↗

EncodeBase64 is similar to Encode. It writes the encoded set to enc. It also adds each pre-base64-encoded byte to hash. Closures or interfaces could be used to merge both methods into one, but they are intentionally avoided to prevent extra allocations of temporary buffers used during encoding. WA

(enc *base64.Encoder, hash *util.FNV64)

Source from the content-addressed store, hash-verified

316// WARNING: this is used by plan gists, so if this encoding changes,
317// explain.gistVersion needs to be bumped.
318func (s *Fast) EncodeBase64(enc *base64.Encoder, hash *util.FNV64) error {
319 return s.encodeImpl(nil, enc, hash)
320}
321
322func (s *Fast) encodeImpl(buf *bytes.Buffer, enc *base64.Encoder, hash *util.FNV64) error {
323 if s.large != nil && s.large.Min() < 0 {

Callers

nothing calls this directly

Calls 1

encodeImplMethod · 0.95

Tested by

no test coverage detected