ENG-5865 Improved byte buffer management (go native!)