packed_booleans

Crates.iopacked_booleans
lib.rspacked_booleans
version0.3.0
sourcesrc
created_at2023-08-18 01:07:18.828282
updated_at2023-11-23 04:00:29.842131
descriptionA crate to pack booleans together.
homepage
repositoryhttps://github.com/cod10129/packed_booleans
max_upload_size
id947495
size16,274
(cod10129)

documentation

README

A crate for packing booleans

crates.io

The standard bool type is always a full byte. This becomes a problem when multiple booleans are in the same struct, as 2 bools are stored as 2 bytes, which is unnecessary and wastes space.

This crate exists to solve that problem. The PackedBools type contains 8 booleans at the cost of only a single byte of memory.

no_std

This crate is fully no_std compatible.

Commit count: 63

cargo fmt