Since this now exposes a public interface, the API should be audited. In particular, I'm wary of the usage of `ssize_t` in some of the APIs.