Skip to content
/ go-ef Public

A Go implementation of the Elias-Fano encoding

License

Notifications You must be signed in to change notification settings

amallia/go-ef

Repository files navigation

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
}

About

A Go implementation of the Elias-Fano encoding

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages