Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
bitio
✓ github.com/icza/bitio
Write and read bits using bitio Writer and Reader.
package main
import (
"bytes"
"fmt"
"github.com/icza/bitio"
)
func main() {
var buf bytes.Buffer
w := bitio.NewWriter(&buf)
w.WriteBits(0xAA, 8)
w.Close()
r := bitio.NewReader(&buf)
val, err := r.ReadBits(8)
if err == nil {
fmt.Printf("Read: %x\n", val)
}
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.1.0latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.