functions for netstrings.