encoder_t: Use ssize_t rather that int for read method