unsafe fn rebuild_vec(
    ptr: *mut u8,
    len: usize,
    cap: usize,
    off: usize
) -> Vec<u8>