let get_uint8 buf off =
          (if (off < 0) || (off >= (Bigarray.Array1.dim buf))
           then raise (Invalid_argument "index out of bounds")
           else ();
           unsafe_get_uint8 buf off)