skippydb 0.2.2

A high-performance verifiable key-value store with SHA256 Merkle trees and optional CUDA GPU acceleration, designed for blockchain state storage.
1
2
3
4
5
6
pub fn try_get_slice(bz: &[u8], start: usize, end: usize) -> Result<&[u8], String> {
    if end > bz.len() {
        return Err(format!("end({}) >= bz.len()", end));
    }
    Ok(&bz[start..end])
}