Basic netstring parsing and construction