Utility for length-prefixing, and Stream splitting.