unsafe fn rebuild_boxed_slice(
    buf: *mut u8,
    offset: *const u8,
    len: usize
) -> Box<[u8]>