![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
github.com/RoaringBitmap/gocroaring
Well-tested Go wrapper for CRoaring (a C/C++ implementation of Roaring Bitmaps)
Roaring bitmaps are used by several important systems:
Roaring bitmaps are found to work well in many important applications:
Use Roaring for bitmap compression whenever possible. Do not use other bitmap compression methods (Wang et al., SIGMOD 2017)
The original java version can be found at https://github.com/RoaringBitmap/RoaringBitmap
There is a native Go version at https://github.com/RoaringBitmap/roaring
This code is licensed under Apache License, Version 2.0 (ASL2.0).
Copyright 2016 by the authors.
See https://github.com/lemire/gobitmapbenchmark for a comparison between this wrapper and the Go native version.
None in particular.
Naturally, you also need to grab the roaring code itself:
Here is a simplified but complete example:
package main
import (
"fmt"
"github.com/RoaringBitmap/gocroaring"
)
func main() {
// example inspired by https://github.com/fzandona/goroar
fmt.Println("==roaring==")
rb1 := gocroaring.New(1, 2, 3, 4, 5, 100, 1000)
rb1.RunOptimize() // improves compression
fmt.Println("Cardinality: ", rb1.Cardinality())
fmt.Println("Contains 3? ", rb1.Contains(3))
rb2 := gocroaring.New()
rb2.Add(3, 4, 1000)
rb2.RunOptimize() // improves compression
rb1.And(rb2)
// prints {3,4,1000}
fmt.Println(rb1)
rb3 := gocroaring.New(1, 5)
rb3.Or(rb1)
// prints 1, 3, 4, 5, 1000
i := rb3.Iterator()
for i.HasNext() {
fmt.Println(i.Next())
}
fmt.Println()
fmt.Println(rb3.ToArray())
fmt.Println(rb3)
rb4 := gocroaring.FastOr(rb1, rb2, rb3) // optimized way to compute unions between many bitmaps
fmt.Println(rb4)
// next we include an example of serialization
buf := make([]byte, rb1.SerializedSizeInBytes())
rb1.Write(buf) // we omit error handling
newrb, _ := gocroaring.Read(buf)
if rb1.Equals(newrb) {
fmt.Println("I wrote the content to a byte stream and read it back.")
}
fmt.Println(rb1.Stats()) // show the cardinality and the numbers of each type of container used.
}
Current documentation is available at http://godoc.org/github.com/RoaringBitmap/gocroaring
https://groups.google.com/forum/#!forum/roaring-bitmaps
You can read bitmaps in Go, Java, C, C++ that have been serialized in Go, Java, C, C++.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.