📚 go-ef - Awesome Go Library for Data Structures and Algorithms

Go Gopher mascot for go-ef

A Go implementation of the Elias-Fano encoding.

🏷️ Data Structures and Algorithms
📂 Frameworks for performing ELT / ETL
31 stars
View on GitHub 🔗

Detailed Description of go-ef

go-ef

A Go implementation of the Elias-Fano encoding

Build Status GoDoc Go Report Card cover.run go

Example

package main
import (
    "fmt"
    "github.com/amallia/go-ef"
    "os"
)

func main() {
    array := []uint64{1,5,10}
    size := len(array)
    max := array[size-1]
    obj := ef.New(max, size)

    obj.Compress(array)

    v, err := obj.Next()
    if err != nil {
        fmt.Println(err)
        os.Exit(1)
    }
    fmt.Println(v) // 1

    obj.Next()
    fmt.Println(obj.Value()) // 5
}