MCPcopy Create free account
hub / github.com/RoaringBitmap/roaring / FromBase64

Method FromBase64

roaring64/roaring64.go:33–41  ·  view source on GitHub ↗

FromBase64 deserializes a bitmap from Base64

(str string)

Source from the content-addressed store, hash-verified

31
32// FromBase64 deserializes a bitmap from Base64
33func (rb *Bitmap) FromBase64(str string) (int64, error) {
34 data, err := base64.StdEncoding.DecodeString(str)
35 if err != nil {
36 return 0, err
37 }
38 buf := bytes.NewBuffer(data)
39
40 return rb.ReadFrom(buf)
41}
42
43// ToBytes returns an array of bytes corresponding to what is written
44// when calling WriteTo

Callers 1

TestBase64_036Function · 0.95

Calls 1

ReadFromMethod · 0.95

Tested by 1

TestBase64_036Function · 0.76