Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

parquet-go/bitpack

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bitpack

Go Reference

A high-performance Go library for bit packing and unpacking integers of various bit widths. Part of the parquet-go ecosystem.

Includes AMD64 assembly optimizations with pure Go fallback for portability.

go get github.com/parquet-go/bitpack

Usage

import "github.com/parquet-go/bitpack"

// Pack int32 values with 3-bit width
values := []int32{1, 2, 3, 4, 5}
bitWidth := uint(3)
packedSize := bitpack.ByteCount(uint(len(values)) * bitWidth)
dst := make([]byte, packedSize+bitpack.PaddingInt32)
bitpack.PackInt32(dst, values, bitWidth)

// Unpack int32 values
unpacked := make([]int32, len(values))
bitpack.UnpackInt32(unpacked, dst, bitWidth)

For complete working examples, see the examples directory.

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.