Crate succinct [] [src]

Succinct data structures for Rust.

So far we have:

  • bit vectors and bit buffers;
  • integer vectors with arbitrary-sized (1- to 64-bit) elements;
  • a variety of [universal codes](coding/index.html;
  • constant-time rank queries; and
  • O(lg lg n)-time select queries based on binary search over ranks.

Usage

It’s on crates.io, so you can add

[dependencies]
succinct = "0.4.3"

to your Cargo.toml and

extern crate succinct;

to your crate root.

Modules

bit_vec

Bit vector interfaces and implementations.

broadword

Broadword operations treating u64 as a parallel vector.

coding

Codes for data compression.

int_vec

Vectors of k-bit unsigned integers.

rank

Support for fast rank queries.

select

Support for fast select queries.

storage

Traits describing how bits and arrays of bits are stored.

stream

Bit-oriented streams for coding.

Macros

impl_bit_rank_support_adapter

Implements BitRankSupport for a type that contains a BitRankSupport field.

impl_bit_vec_adapter

Implements BitVec for a type that contains a BitVec field.

impl_rank_support_adapter

Implements RankSupport for a type that contains a RankSupport field.

impl_select0_support_adapter

Implements Select0Support for a type that contains a Select0Support field.

impl_select1_support_adapter

Implements Select1Support for a type that contains a Select1Support field.

impl_select_support_adapter

Implements SelectSupport for a type that contains a SelectSupport field.

impl_stack_only_space_usage

Implements SpaceUsage for a stack-only (Copy) type.

Structs

BinSearchSelect

Performs a select query by binary searching rank queries.

BitVector

Uncompressed vector of bits.

IntVector

Uncompressed vector of k-bit unsigned integers.

JacobsonRank

Jacobson’s rank structure for fast rank queries over a BitVec.

Rank9

Vigna’s rank structure for fast rank queries over a BitVec.

Traits

BitRankSupport

Supports fast rank queries over bools.

BitVec

Read-only bit vector operations.

BitVecMut

Mutable bit vector operations that don’t affect the length.

BitVecPush

Bit vector operations that change the length.

IntVec

An immutable array of integers of limited width.

IntVecMut

A mutable array of integers of limited width.

Select1Support

Supports selecting for 1 bits.

SpaceUsage

Computes the space usage of an object.