MCPcopy
hub / github.com/RoaringBitmap/roaring / ToBase64

Method ToBase64

roaring.go:25–29  ·  view source on GitHub ↗

ToBase64 serializes a bitmap as Base64

()

Source from the content-addressed store, hash-verified

23
24// ToBase64 serializes a bitmap as Base64
25func (rb *Bitmap) ToBase64() (string, error) {
26 buf := new(bytes.Buffer)
27 _, err := rb.WriteTo(buf)
28 return base64.StdEncoding.EncodeToString(buf.Bytes()), err
29}
30
31// FromBase64 deserializes a bitmap from Base64
32func (rb *Bitmap) FromBase64(str string) (int64, error) {

Callers 1

TestBase64_036Function · 0.45

Calls 1

WriteToMethod · 0.95

Tested by 1

TestBase64_036Function · 0.36