bitstring

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package bitstring provides functions for operating on byte slices as if they are 0-indexed arrays of bits, packed 8 bits to a byte, LSB-first.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BitAt

func BitAt(bitString []byte, idx int) (bool, error)

BitAt returns the bit in the idx'th position (zero-indexed) in the given bitstring.

func Decode

func Decode(src string) ([]byte, error)

Decode decodes a compressed bitstring from a base64URL-encoded string.

func Encode

func Encode(bitString []byte) (string, error)

Encode gzips a bitstring and encodes it as a raw urlsafe base-64 string.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL