Created
March 6, 2017 16:16
-
-
Save maciej/6dbc8b35feaa4a808037d0f5cbae307d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.DataInputStream | |
| import org.roaringbitmap.buffer.MutableRoaringBitmap | |
| object RankBug { | |
| def main(args: Array[String]): Unit = { | |
| val in = new DataInputStream(this.getClass.getClassLoader.getResourceAsStream("buggy-rank.bitmap")) | |
| try { | |
| val bitmap = new MutableRoaringBitmap() | |
| bitmap.deserialize(in) | |
| println(bitmap.rank(2374936)) | |
| bitmap.removeRunCompression() | |
| println(bitmap.rank(2374936)) | |
| } finally { | |
| in.close() | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment