Field RequestEncoder::sync has type ssize_t and its getter returns a size_t value. Furthermore, Header::sync has type int. We should use the same type for all of them to avoid casts, explicit and implicit, across the codebase. Also, there could be similar places - it would be nice to fix them as well.