qbin 0.2.0

Encoding and decoding geographical coordinates to and from Quadbin, a hierarchical geospatial indexing system for square cells in Web Mercator projection developed by Carto. An improved version of Microsoft's Bing Maps Tile System, aka Quadkey.
Documentation
use criterion::{Criterion, black_box};
use h3o::CellIndex;
use qbin::Cell;

const INPUT_H3: u64 = 0x8f734e64992d6d8;
const INPUT_QB: u64 = 5209574053332910079;

pub fn bench(c: &mut Criterion) {
    let mut group = c.benchmark_group("getResolution");

    group.bench_function("h3o", |b| {
        let index = CellIndex::try_from(INPUT_H3).expect("cell index");
        b.iter(|| black_box(index).resolution())
    });
    group.bench_function("qbin", |b| {
        let index = Cell::new(INPUT_QB);
        b.iter(|| black_box(index).resolution())
    });

    group.finish();
}