libpt_bintols/
lib.rs

1//* # Tools to work with binary values, memory, storage
2//!
3//! This crate is part of [`pt`](../libpt/index.html), but can also be used as a standalone
4//! module.
5
6// official binary prefixes, see [https://en.wikipedia.org/wiki/Binary_prefix]
7/// 2^10
8pub const KIBI: usize = 2usize.pow(10);
9/// 2^20
10pub const MEBI: usize = 2usize.pow(20);
11/// 2^30
12pub const GIBI: usize = 2usize.pow(30);
13/// 2^40
14pub const TEBI: usize = 2usize.pow(40);
15/// 2^50
16pub const PEBI: usize = 2usize.pow(50);
17/// 2^60
18pub const EXBI: u128 = 2u128.pow(60);
19// at this point, `usize` would overflow, so we have to switch to a bigger datatype.
20/// 2^70
21pub const ZEBI: u128 = 2u128.pow(70);
22/// 2^80
23pub const YOBI: u128 = 2u128.pow(80);
24
25// use libpt_core;
26pub mod datalayout;
27pub mod display;
28pub mod join;
29pub mod split;