read binary data