byte buffer to windows backport