Completed binary_read example